You are on page 1of 2

Frequently used commands in the Labs

Use the keyboard


Go up (recall previous command) <ctrl>+p
Go down <ctrl>+n
Go right <ctrl>+f
Go left <ctrl>+b
Start the virtual keyboard /home/tc/xvkdb.sh &
Get out of the qemu window <ctrl>+<alt>

Files management
See files in a directory ls
Move to the "x" directory cd x
Move up in the directories cd ..
Move to my own directory cd
Remove file "x" rm x
See the content of file "x" more x
Edit file "x" editor x

Processes management
See the list of running processes ps -ax
Start program "x" in background x&
Start program "x" located in the current directory in foreground ./x
Kill process "x" pkill x
Start program "x" with administrator rights sudo x
Interrupt a process in foreground <ctrl>+c
Redirect the output of program "x" to the file "f" x>f

Network management
List existing interfaces ifconfig -a
Associate IP address "X" with mask "M" to the interface "e" ifconfig e X netmask M
Display a summary of frames received or emitted by the interface "e" tcpdump -i e
Display the content of frames received or emitted by the interface "e" tcpdump -i e -xx
Start the DHCP client udhcpc -R
Kill the DHCP client pkill udhcpc
Start the DHCP server /usr/local/etc/init.d/isc-dhcpd start
Kill the DHCP server pkill dhcpd
List existing routes in the forwarding table route
Add a route to the network defined by address "X" and mask "M" through router "I" route add -net X netmask M gw I
Add a route to the network defined by address "X" and prefix "L" through router "I" route add -net X/L gw I
Remove the route to the network defined by address "X" and prefix "L" through router "I" route del -net X/L gw I
Test the communication between current host and host "I" ping I
List the mappings between MAC and IP addresses arp -a
List the existing connections or running applications using TCP. netstat -t
List the existing communications or running applications using UDP. netstat -u

You might also like