Unix Commands

Unix commands work from the command line in Unix/BSD/Linux operating systems in the same way DOS commands work from the Command Prompt in MS Windows. However you can do much more with Unix commands than with DOS commands. Below are a few of the more commonly used Unix commands

lsLists the contents of a given directory.
cdchange directory; 'cd files' changes you to 'files' directory.
mkdirmake directory; 'mkdir music' creates a directory named 'music'.
rmremove; rm 'msapps.exe' deletes the file 'msapps.exe'.
rmdirremove directory; 'rmdir music' deletes the directory 'music'.
pwdpresent working directory; Use this to find out what directory you are in.
su rootType this when you need root acces. You'll be prompted for a password.
ps -aType this to get a list of all active processes.
killTerminates processes. 'kill 1033' terminates PID 1033. Get a processe's PID with 'ps'.
exitExit root access or exit from terminal in X Windows.
ifconfigGet information or alter you network configuration.
shutdown -h nowShut down the system.
shutdown -r nowReboot the system.
startxStart X Windows.
mountMount drives so you can access them.
 'mount -t msdos /dev/da0s1 /mnt/usbdrive' mounts a thumb drive.
 Check '/dev' and ls directory for names of devices. Use mkdir to make
  directories for floppy, cdrom, usbdrive, etc inside the '/mnt' directory.
  I type 'cd /mnt/usbdrive' than ls to see whats in the usb drive.
umount'umount /mnt/usbdrive' unmounts the thumb drive./tr>
cpCopy files. 'cp /mnt/usbdr/dre.mp3 files/music/dre.mp3' copies file 'dre.mp3' from usbdr to music
mvRenames files. 'mv bond.txt powers.txt' renames bond.txt as powers.txt.


You can learn more from the Unix tutorial on the University of Surrey's website.