Basic UNIX Commands
Basic UNIX Commands
Example
Description
1.
ls
ls
ls -alF
2.
cd
cd tempdir
cd ..
cd ~dhyatt/web-docs
3.
mkdir
mkdir graphics
4.
rmdir
rmdir emptydir
5.
cp
cp file1 web-docs
cp file1 file1.bak
6.
rm
rm file1.bak
rm *.tmp
7.
mv
mv old.html new.html
http://www.tjhsst.edu/~dhyatt/superap/unixcmd.html
1/5
11/14/2014
8.
more
more index.html
9.
lpr
lpr index.html
man ls
10. man
Example
Description
1. grep <str>
<files>
2. chmod <opt>
<file>
3.
passwd
passwd
Change passwd
4.
ps <opt>
ps aux
ps aux | grep dhyatt
5. kill <opt>
<ID>
kill -9 8453
6. gcc (g++)
<source>
7.
gzip <file>
gzip bigfile
gunzip bigfile.gz
Compress file
Uncompress file
8.
mail
(pine)
9.
telnet <host>
ssh <host>
telnet vortex.tjhsst.edu
ssh -l dhyatt
jazz.tjhsst.edu
ftp station1.tjhsst.edu
ncftp metalab.unc.edu
http://www.tjhsst.edu/~dhyatt/superap/unixcmd.html
2/5
11/14/2014
<host/directory>
Example
Description
1.
who
who
2.
finger
finger
3. ytalk
<user@place>
ytalk
dhyatt@threat
4.
history
history
5.
fortune
fortune
6.
date
date
7. cal <mo>
<yr>
cal 9 2000
8.
xeyes
xeyes &
9.
xcalc
xcalc &
mpage -8
file1 | lpr
10. mpage
<opt> <file>
Example
Description
1.
netscape &
netscape
http://www.tjhsst.edu/~dhyatt/superap/unixcmd.html
3/5
11/14/2014
2.
xv
xv &
3.
xfig / xpaint
4.
gimp
gimp &
5.
ispell <fname>
ispell file1
6.
latex <fname>
latex file.tex
7.
xemacs / pico
Different editors
8.
soffice
soffice &
9. m-tools (mdir,
mcopy,
mdel, mformat, etc. )
mdir a:
mcopy file1 a:
10. gnuplot
gnuplot
Example
Description
1.
df
df
2.
du
du -b subdir
3.
alias
4.
xhost
xhost +
threat.tjhsst.edu
xhost -
5.
fold
http://www.tjhsst.edu/~dhyatt/superap/unixcmd.html
4/5
11/14/2014
6.
tar
7.
ghostview
(gv)
gv filename.ps
8.
ping
threat.tjhsst.edu
traceroute
www.yahoo.com
top
logout or exit
ping
(traceroute)
9.
top
10. logout
(exit)
http://www.tjhsst.edu/~dhyatt/superap/unixcmd.html
5/5