The total number of Unix commands is immense. No normal user or system administrator would ever need to know them all.
The Unix commands available to you will vary based upon several factors:
The version of Unix you are using (FreeBSD, Linux, Solaris, AIX, HP-UX, OpenBSD, etc...)
The Unix shell you are using (sh, csh, tcsh, ksh, bash, etc...)
The packages installed on the system and the way the system is configured
Your access level on the system
In this FAQ, I will address only Bash shell commands, as all other major shells can now be considered obsolete.
This list of basic Unix commands will get you started using and learning Unix.
Use the Unix `man` command to learn more about any of these commands.
Basic Unix Commands
Unix Command
Description
ls
List directory contents
cp
Copy files
rm
Remove directory entries
file
Determine file type
find
Walk a file hierarchy
which
Locate a program file in the user's path
whereis
Locate programs
gcc, g++
GNU project C and C++ Compiler
gdb
The GNU Debugger
less
View the contents of a text file
diff
Find differences between two files
cmp
Compare two files
vi
Text editor
chmod
Change file modes
man
Display the on-line manual pages
mv
Move and rename files
ispell
Interactive spelling checker
biff
Be notified if mail arrives and who it is from
lpr
Print a file
lpq
Show the print queue
ftp
Transfer a file to another Unix system
logout
Quit using the system
pwd
Print working directory name
cd
Change working directory
ln
Make a file link
mkdir
Make directories
rmdir
Remove directories
chmod
Change file modes
quota
Display disk usage and limits
history
Display a list of recent commands
ps
Show the status of processes
kill
Stop a running processes
passwd
Change your password
alias
Create a command alias
unalias
Delete a command alias
export
Set an environment variable
script
Record your terminal session to a file
bg
Send a job to the background
fg
Bring a job to the foreground
jobs
Print a list of current jobs
The basic Unix commands are fairly standard across the various Unix platforms, although command arguments differ at times. In addition, the basic Unix commands vary between Unix shells.