Ten ESSENTIAL UNIX Commands These are ten commands that you really need to know in order to get started with UNIX. They are probably similar to commands you already know for another operating system.
Command | Example | Description |
|
ls ls –alF | Lists files in current directory List in long format |
|
cd tempdir cd .. cd ~dhyatt/web-docs | Change directory to tempdir Move back one directory Move into dhyatt's web-docs directory |
|
mkdir graphics | Make a directory called graphics |
|
rmdir emptydir | Remove directory (must be empty) |
|
cp file1 web-docs cp file1 file1.bak | Copy file into directory Make backup of file1 |
|
rm file1.bak rm *.tmp | Remove or delete file Remove all file |
|
mv old.html new.html | Move or rename files |
|
more index.html | Look at file, one page at a time |
|
lpr index.html | Send file to printer |
|
man ls | Online manual (help) about command |
Ten VALUABLE UNIX Commands Once you have mastered the basic UNIX commands, these will be quite valuable in managing your own account.
Command | Example | Description |
|
grep "bad word" * | Find which files contain a certain word |
|
chmod 644 *.html chmod 755 file.exe | Change file permissions read only Change file permissions to executable |
|
passwd | Change passwd |
|
ps aux ps -ef | grep java | List all running processes by #ID List process #ID's running by java |
|
kill -9 8453 | Kill process with ID #8453 |
|
gcc file.c -o file g++ fil2.cpp -o fil2 | Compile a program written in C Compile a program written in C++ |
|
gzip bigfile gunzip bigfile.gz | Compress file Uncompress file |
|
mail me@tjhsst.edu < file1 pine | Send file1 by email to someone Read mail using pine |
|
telnet vortex.tjhsst.edu ssh -l dhyatt jazz.tjhsst.edu | Open a connection to vortex Open a secure connection to jazz as user dhyatt |
|
ftp station1.tjhsst.edu ncftp metalab.unc.edu | Upload or Download files to station1 Connect to archives at UNC |
Ten FUN UNIX Commands These are ten commands that you might find interesting or amusing. They are actually quite helpful at times, and should not be considered idle entertainment.
Command | Example | Description |
|
who | Lists who is logged on your machine |
|
finger | Lists who is on computers in the lab |
|
ytalk dhyatt@threat | Talk online with dhyatt who is on threat |
|
history | Lists commands you've done recently |
|
fortune | Print random humerous message |
|
date | Print out current date |
|
cal 9 2000 | Print calendar for September 2000 |
|
xeyes & | Keep track of cursor (in "background") |
|
xcalc & | Calculator ("background" process) |
|
mpage -8 file1 | lpr | Print 8 pages on a single sheet and send to printer (the font will be small!) |
Ten HELPFUL UNIX Commands These ten commands are very helpful, especially with graphics and word processing type applications.
Command | Example | Description |
|
netscape & | Run Netscape browser |
|
xv & | Run graphics file converter |
|
xfig & (xpaint &) | Run drawing program |
|
gimp & | Run photoshop type program |
|
ispell file1 | Spell check file1 |
|
latex file.tex | Run LaTeX, a scientific document tool |
|
xemacs (or pico) | Different editors |
|
soffice & | Run StarOffice, a full word processor |
|
mdir a: mcopy file1 a: | DOS commands from UNIX (dir A:) Copy file1 to A: |
|
gnuplot | Plot data graphically |
Ten USEFUL UNIX Commands: These ten commands are useful for monitoring system access, or simplifying your own environment.
Command | Example | Description |
|
df | See how much free disk space |
|
du -b subdir | Estimate disk usage of directory in Bytes |
|
alias lls="ls -alF" | Create new command "lls" for long format of ls |
|
xhost + threat.tjhsst.edu xhost - | Permit window to display from x-window program from threat Allow no x-window access from other systems |
|
fold -s file1 | lpr | Fold or break long lines at 60 characters and send to printer |
|
tar -cf subdir.tar subdir tar -xvf subdir.tar | Create an archive called subdir.tar of a directory Extract files from an archive file |
|
gv filename.ps | View a Postscript file |
|
ping threat.tjhsst.edu traceroute www.yahoo.com | See if machine is alive Print data path to a machine |
|
top | Print system usage and top resource hogs |
|
logout or exit | How to quit a UNIX shell. |
To check your disk utilization on Solaris or Linux, use the iostat -D <interval> command, where the interval value determines how many seconds you want to elapse between monitoring cycles. To check your CPU utilization, simply leave off the -D flag (iostat <interval>). For Windows, use the Performance Monitor tool (perfmon), to monitor both your disk and CPU utilization. TCP (transmission control protocol) socket performance, set the tcp_time_wait_interval parameter as follows: ndd -set /dev/tcp tcp_time_wait_interval 60000 Check the amount of data transferred between the application and the application server, and between the application server and the database server. netstat -s -P tcp Use Kill -3 PID, where PID is the root of the process tree. To obtain the root PID, perform a: ps -efHl | grep 'java' **. ** Check out our Related Courses Weblogic Tutorials Introduction to Clustering Weblogic WebLogic Server Admin Training in Houston Oracle Weblogic Server Installation
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.