Saturday , November 25 2017
Home / Unix & Linux / BASIC UNIX COMMANDS


Basic Unix Commands
Command Example Description
1. ls
ls -alF Lists files in current directory
List in long format
2. cd tempdir
cd ..
cd ~sarath/web-docs Change directory to tempdir
Move back one directory
Move into sarath’s web-docs directory
3. mkdir mkdir graphics Make a directory called graphics
4. rmdir rmdir emptydir Remove directory (must be empty)
5. cp file1 web-docs
cp file1 file1.bak Copy file into directory
Make backup of file1
6. rm file1.bak
rm *.tmp Remove or delete file
Remove all file
7. mv old.html new.html Move or rename files
8. more index.html Look at file, one page at a time
9. lpr index.html Send file to printer
10. man man ls Online manual (help) about command

Command Example Description
1. grep “sample word” * Find which files contain a certain word
2. chmod chmod 644 *.html
chmod 755 file.exe Change file permissions read only
Change file permissions to executable
3. passwd Change passwd
4. ps aux
ps aux | grep sarath List all running processes by #ID
List process #ID’s running by sarath
5. kill -9 8453 Kill process with ID #8453
7. gzip bigfile
gunzip bigfile.gz Compress file
Uncompress file
8. mail
(pine) mail < file1
pine Send file1 by email to someone
Read mail using pine
9. telnet
ssh telnet
ssh -l sarath Open a connection to vortex
Open a secure connection to jazz as user sarath
10. ftp
ncftp <host/directory> ftp
ncftp Upload or Download files to station1
Connect to archives at UNC

Command Example Description
1. who who Lists who is logged on your machine
2. finger Lists who is on computers in the lab
4. history Lists commands you’ve done recently
5. fortune Print random humorous message
6. date Print out current date

Command Example Description
1. df See how much free disk space
2. du -b subdir Estimate disk usage of directory in Bytes
4. xhost +
xhost – Permit window to display from x-window program from threat
Allow no x-window access from other systems
6. tar -cf subdir.tar subdir
tar -xvf subdir.tar Create an archive called subdir.tar of a directory
Extract files from an archive file
8. ping
(traceroute) ping
traceroute See if machine is alive
Print data path to a machine
9. top Print system usage and top resource hogs
10. logout (exit) logout or exit How to quit a UNIX shell

Read More:
Oracle Linux Installation on Oracle Virtual box
PIVOT & UN PIVOT Tables in SQL Server
Oracle Linux OS Installation Step by Step on Vmware



Check Also

Openfiler Installation steps

Openfiler Installation steps ENTER /boot – 100MB /tmp – 1gb / – 1gb Remaining leave …

Leave a Reply

Your email address will not be published. Required fields are marked *