General unix commands

Can be run on most if not all flavours of Unix and Linux

Click on the headings to sort

CommandCommon Arguments & DescriptionCommand Description
cdDirectory nameChange directory
df-k (Show in Kilobytes)Display filesystem usage
ipcrm-m shared memory ID (Removes shared memory by ID)Removes message queue, semaphore set, or shared memory identifiers
ipcs-a (Prints most information)Reports interprocess communication facility status
lpstat-pPrintQ1 (Display the status of printer queue PrintQ1)Display information about the current status of the line printer
ls-l (Long listing)Lists contents of a directory
lsof-i -U (List all open Internet, x.25 (HP-UX), and UNIX domain files)List open files
mkdir/home (Create directory /home)Make a directory
mount-vcdrfs -oro /dev/cd0 /mnt (Mount the cdrom device onto /mnt)Makes a file system available for use
netstat-rn (Display the routing table. -n shows addresses as numbers, does not resolve to names)Display routing table
pwd(No arguments)Print Working Directory - Show the current directory
rpm-e package (Erase an rpm package)Redhat Package Manager Erase
rpm-ivh package_file.rpm (Install verbosely an rpm package file)Redhat Package Manager Install
rpm-qa "string" (Search for installed package with "string" in it's name)Redhat Package Manager Search
rpm-qf /usr/bin/mem (Find out which package owns the file /usr/bin/mem)Redhat Package Manager Owns
rpm-qlp "package_file.rpm" (List files in package file)Redhat Package Manager Files
rpm-qp --info "package_file.rpm" (List descriptive info from package file)Redhat Package Manager Info
rpm-qp --scripts "package_file.rpm" (List scripts in package file)Redhat Package Manager Scripts
showmount-e host1 (Show the NFS server (host1) export list)Show mount information for an NFS server
SMcli-d -v -S (Displays the name of the array, ip-addresses of the controllers and a brief status)Command line access for IBM/Brocade storage arrays
SMcli-n mysan -c "show allDriveChannels stats;" (Displays drive channel statistics of the array "mysan")Command line access for IBM/Brocade storage arrays
SMcli-n mysan -c "show storagesubsystem profile;" (Displays information about the storage subsystem of the array "mysan")Command line access for IBM/Brocade storage arrays
uname-a (Show "all" information)Displays OS, system name, machine ID etc