BASIC Linux Commands

horizontal page spacer

A quick list of commands, these are all in our text Linux Desk Reference, Second Edition by Scott Hawkins. You can also use the man page (or info) for further information, or as an on-line reference:
Alphabetical Directory of Linux Commands from the O'Reilly book: Linux in a Nutshell

Command Description
These you must know
cat Concatenates files and print to standard output
cd Changes to a directory
chmod Change access permissions of files
chown Change the user and group ownership of files
cp Copy files
find Finds files
grep Find lines matching a certain pattern
head Display the first few lines of a file
less Filter for viewing files (less is more)
locate Locate files that match a certain pattern
ls List directory contents (MANY -options)
man View manual pages
mkdir Makes a new directory
more filter for viewing files and directories (more OR less)
mount access or mount filesystems and devices
mv Move or rename files and directories
ps Display process tree
pwd Displays the present working directory
rm Remove files
rmdir Remove directories
su Switch to a different user
tail Display the last few lines of a file
umount Unmount filesystems ( note 'u' not unmount)
which Display a program's executable path
who Show the users that are logged in
whoami Show the user that you are currently logged in as
These you should know
alias Make different names for commands
clear Clear the terminal screen
date Display the system date and time
df Available free disk space
du Disk space used
groups displays a user's group
kill Abort system processes
ln Create links between files and diretories
logout (ctrl+d) or exit Sign off of current user
passwd Change passwords
ping Check a host on the network
sort sort lines of text files on some key
top Display running processes
touch Used to create a file or update it's time stamp
These would be great to know
apropos word Show commands pertinent to word (same as man -k word).
rpm Manage rpm packages
diff Compare two text files. diff reports lines that differ between file1 and file2
chgrp Change the group of one or more files to newgroup
These you should know exist
awk pattern scanning and processing language
bzip2 / bunzip2 Compress and decompress files
chsh Change your shell
cut remove sections (columns) from each line of files
dd Copy disk images
dir List directory contents
fdisk Used to create and delete partitions
finger Look up user information
gzip/gunzip Compress and decompress files
ifconfig Used to setup network interfaces
join Combine files, join lines of two files on a common field
lpq View printer queue
lpr Print files
lprm cancels print jobs that have been queued for printing
make Compile and maintain programs
sed a stream editor
set Temporarily change environment variables
shutdown Shut down the system :-)
startx Start the X Window system
tar Create and manage archives (can filter through bzip2 or gzip)
whatis Gives brief overview of commands
Sys Admin or less often used
at Runs a program at certain times
atq Lists programs waiting to be run by at
atrm Removes programs from the at queue
chfn Changes information displayed by finger
dmesg list startup messages
dump Used to backup filesystems
e2fsck filesystem checker
export Set environment variables in bash
fdformat Low level format a floppy disk
free Information on RAM and swap usage
groupadd Adds a new group
groupdel Deletes a group
halt Shut down system
host Look up host information
init Change run levels
insmod Install modules
login Sign on to system or switch users
lpc Manage printer queue
lsmod View loaded modules
makewhatis Build whatis database
mcd Change to directory on a DOS diskette
mcopy Copy files to a DOS diskette
mdel Delete files on a DOS diskette
mdeltree Delete directories on a DOS diskette
mformat Format DOS diskettes
mdir Lists directory contents on a DOS diskette
mkbootdisk Makes a boot disk :-) ( you did make one right?)
mkswap Setup swap device
modprobe Installs modules
netstat Displays status of network connections
nslookup Name server lookup tool
printtool Used to setup printers
pstree Displays entire process tree
reboot Reboots system :-)
restore Used to restore a dump backup
rmmod remove loaded modules
sync Flush buffered data to hard disk
sysinfo Display system information
traceroute Displays route of IP packets
uname Display information about your system
unzip Extract compressed files
updatedb Builds locate's database
uptime Shows how long your system has been running
useradd Adds new user accounts
userdel Delete user accounts
usermod Modify user accounts
whereis Locate binary, source and manual pages for a command
xlock Locks the X Window system
Counter image