Unix Commands Reference Card Template Page 2

ADVERTISEMENT

Environment Control
Environment Status
Command
Description
Command
Description
cd d
Change to directory d
ls [d] [f...]
List files in directory
mkdir d
Create new directory d
ls -1 [f...]
List files in detail
rmdir d
Remove directory d
alias [name]
Display command aliases
mv f1 [f2...] d
Move file f to directory d
printenv [name]
Print environment values
mv d1 d2
Rename directory d1 as d2
quota
Display disk quota
passwd
Change password
date
Print date & time
alias name1 name2
Create command alias
who
List logged in users
unalias name1
Remove command alias name1
whoami
Display current user
rlogin nd
Login to remote node
finger [username]
Output user information
logout
End terminal session
chfn
Change finger information
setenv name v
Set env var to value v
pwd
Print working directory
unsetenv name1 name2...]
remove environment variable
history
Display recent commands
! n
Submit recent command n
Output, Communication, & Help
File Manipulation
Command
Description
lpr -P printer f
Output file f to line printer
Command
Description
script [f]
Save terminal session to f
vi [f]
Vi fullscreen editor
exit
Stop saving terminal
emacs [f]
Emacs fullscreen editor
session
ed [f]
Text editor
mail username
Send mail to user
wc f
Line, word, & char count
biff [y/n]
Instant notification of mail
cat f
List contents of file
man name
UNIX manual entry for
more f
List file contents by screen
name
cat f1 f2 > f3
Concatenates f1 & f2 into f3
learn
Online tutorial
chmod mode f
Change protection mode of f
cmp f1 f2
Compare two files
cp f1 f2
Copy file f1 into f2
Process Control
sort f
Alphabetically sort f
split [-n] f
Split f into n-line pieces
mv f1 f2
Rename file f1 as f2
Command
Description
rm f
Delete (remove) file f
Ctrl/c *
Interrupt processes
grep ‘ptn’ f
Outputs lines that match ptn
Ctrl/s *
Stop screen scrolling
diff f1 f2
Lists file differences
Ctrl/q *
Resume screen output
head f
Output beginning of f
sleep n
Sleep for n seconds
tail f
Output end of f
jobs
Print list of jobs
kill [%n]
Kill job n
ps
Print process status stats
Compiler
kill -9 n
Remove process n
Ctrl/z *
Suspend current process
stop %n
Suspend background job n
Command
Description
command&
Run command in background
cc [-o f1] f2
C compiler
bg [%n]
Resume background job n
lint f
Check C code for errors
fg [%n]
Resume foreground job n
f77 [-o f1] f2
Fortran77 compiler
exit
Exit from shell
pc [-o f1] f2
Pascal compiler
Press RETURN at the end of each command, except those marked by an asterisk (*).

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 2