What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags





Commands tagged VBoxManage from sorted by
Terminal - Commands tagged VBoxManage - 8 results
VBoxBlockBoot() { sudo umount "$2"*; sudo chmod 777 "$2"; VBoxManage storageattach "$1" --medium ~/.rawHD4VB_`basename "$2"`.vmdk --type hdd --storagectl "IDE Controller" --device 0 --port 0 ; VBoxManage startvm "$1";}
2011-07-29 13:04:19
User: totti
Functions: chmod sudo umount

Usage: VBoxBlockBoot [Virtual_Machine] [Block_device]

Eg: VBoxBlockBoot WinXP /dev/sdc

In another words

vm=usb; usb=sdc;sudo umount /dev/$usb* ; sudo chmod 777 /dev/$usb ; VBoxManage storageattach $vm --medium ~/raw-HD-4-VB/$usb.vmdk --type hdd --storagectl "IDE Controller" --device 0 --port 0 ; VBoxManage startvm $vm


vm --> Name of the virtual machine to start

usb --> Block device to use. (/dev/sdc)

This can used after setup up a boot loader on to my USB pen drive or HDD (After creating Live USB). Here root privilege is needed but not granted to Virtual Box. Thus we can access all our VM.( If we run VBox as root we can't access our VMs). Root privilege is used to

- Unmount the storage device

- Chmod to full access (777)


1. Device information file (rawvmdk file) created by the following command. Need to run only once. Not bad to run many.

VBoxCreateRawDisk() { VBoxManage internalcommands createrawvmdk -filename ~/.rawHD4VB_`basename "$1"`.vmdk -rawdisk "$1"; }

2. Root privilege to umount & chmod

3. Real storage medium (ie /dev/*) (Non-virtual such as USB HD, pen drive, a partition)

4. A virtual m/c already available (here "usb")

vm=usb; usb=sdc;sudo umount /dev/$usb* ; sudo chmod 777 /dev/$usb ; VBoxManage storageattach $vm --medium ~/raw-HD-4-VB/$usb.vmdk --type hdd --storagectl "IDE Controller" --device 0 --port 0 ; VBoxManage startvm $vm

VBoxBlockBoot() { sudo umount "$2"*; sudo chmod 777 "$2"; VBoxManage storageattach "$1" --medium ~/.rawHD4VB_`basename "$2"`.vmdk --type hdd --storagectl "IDE Controller" --device 0 --port 0 ; VBoxManage startvm "$1"; }

VBoxManage modifyvm "vm-name" --memory 256 --acpi on --ioapic off --pae on --hwvirtex on --nestedpaging on
2011-06-16 18:14:47
User: 0disse0


- memory 256 assign 256 Mb RAM

- acpi on enable ACPI (mandatory if you use Winfog 2000

- ioapic off disable the IO APIC. Not useful if you use one CPU (on virtual machine or a 32 bit operative system). As ACPI, this switch is mandatory for Winbug 2000

- pae on enable the Phisical Address Extension how to use more than 4Gb of RAM on x86 CPU

- hwvirtex on enables hardware virtualization extensions for microprocessors that have this feature (which should be also enabled in the BIOS of the motherboard)

- nestedpaging on allows part of the processes of memory management hardware are made directly

vboxmanage startvm --type gui $(vboxmanage list vms | sed -e 's/"//g' | cut -f1 -d ' ' | dmenu -i -p "VMs")
ssh vm-user@`VBoxManage guestproperty get "vm-name" "/VirtualBox/GuestInfo/Net/0/V4/IP" | awk '{ print $2 }'`
2011-05-04 18:01:36
User: lucasrangit
Functions: awk get ssh

Booting the VM headless via VBoxHeadless requires knowledge of the VM's network in order to connect. Using VBoxManage in this way and you can SSH to the VM without first looking up the current IP, which changes depending on how you have your VM configured.

VBoxManage openmedium dvd "/path/name.iso"
2010-04-23 06:56:42
User: 0disse0

No comment... it's easy! Using the VBoxManage list and the switch 'hdds' or 'dvds' you can show the list of hard disks and DVD registered on the system.

VBoxManage createvm --name "vm-name" --ostype Ubuntu --register
VBoxManage list ostypes
2010-04-23 06:50:42
User: 0disse0

If you want to know what OS are supported on "guest" machines on the Sun VirtualBox server.

VBoxManage list vms
2009-08-07 12:43:04

A similar command that lists only the currently running VMs is thus:

VBoxManage list runningvms

...the above showing a list of VMs by name and UUID in the same format as the "$ VBoxManage list vms" command