Commands: Unix Utilities
vi editor
file handling utilities
security by file permissions
process utilities
networking commands
Text processing utilities
backup utilities
ifconfig -a
dig
traceroute
telnet
ifup
ifdown
nslookup
netstat
scp
nmap
cat
touch
ls
rmdir
mkdir
rm
cp
mv
ln
Already given in separate mind map
rlogin
finger
w
arp
ftp
Foreground processes ex: office programs
Background Processes ex: Antivirus
top
fg
free
kill
nice
df
ps
bg
To send a process to the background
Details on all Active Processes
To run a stopped process in the foreground
Give the status of processes running for a user
kill a process ex: kill PID
Starts a process with a given priority
renice
Changes priority of an already running process
Gives free hard disk space on your system
Gives free RAM on your system
tee
tar (tape archive)
tar -cvf archive.tar f1 f2 f3 //it creates an archive which combine these 3 files
displays or pipes the output to screen and saved in file
cpio (copy input_output)
copies files to and from a backup device.
cat
tail
reads one or more files and prints them to std output
displays the last ten lines of the file
$tail -n 20 filename ; $tail -n +2 filename
head
displays first 10 lines of a file.
sort
sorting is the ordering of data in ascending or descending sequence
ex: $sort filename
nl
numbering lines ex: $nl filename
uniq
displays uniq lines of the given files ex: uniq testfile
grep (global regular expression) searching for a pattern
scans its input for a pattern and displays ex: grep "sales" employee
fgrep
fgrep 'good bad great' userfile
egrep
egrep 'good | bad | great' userfile
cut
extract the req columns or fields from the file.
awk (Aho, Weinberger and Kernighan)
suitable for report formatting capabilities
pg
join
join lines of two files based on a common field
terminal pager program (similar interface like vi)
$pg filename
comm
compare two sorted files line by line
cmp
compares two files of any type and writes the results
diff
displays file differences
tr (translate or transliterate)
$tr 'a-z' 'A-Z' < file1
chmod
umask
file system utilities
unlink
command line utility to delete files
ulimit
umount
The mount command detaches a filesystem, located on some device or other, to the file tree.
mount
The mount command attaches a filesystem, located on some device or other, to the file tree.
du
find
find ./foo -name foo.txt --delete
find ./foo -name foo.txt
search for a file in directory hierarchy
display and set resource limits for users
used to check the information of disk usage of files and directories on a machine
du -h /home/
du -sh /home/
it is a system default permissions for newly created files/folders in the machine.
The minimum and maximum UMASK value for a folder is 000 and 777
The minimum and maximum UMASK value for a file is 000 and 666
changing file/directory permission
Two Modes
Absolute mode (numeric)
Symbolic mode
chmod 764 sample
chmod o=rwx sample
chmod g+x sample
ping
uptime
$netstat -i
whois
Prepared by: Srinivas Adapa, Associate Professor, CSE Department, CITM
$whois citm.ac.in
hostname
to know the system that we are logged in
$hostname -i
to check the ip address assigned to the system
$ifup eth0
$ifdown eth0
telnet connect destination host:port via a telnet protocol if connection establishes
$telnet google.com 443
tool for interrogating DNS name servers (DNS Lookup)
$dig google.com
to query internet domain name servers
$nslookup google.com
a simple way to review network connections and open sockets
to securely copy files to & from another host in the network
$scp $filename user@targethost:/$path
checks the opened ports on the server
$nmap $server_name
the route packets take to network host
to enable ethernet card
to disable ethernet card
$traceroute google.com
used for querying databases that store the registered users of an Internet resource
It can be used to check if a remote host is up, or that network interfaces can be reached.
$ping 127.0.0.1
the simplest file transfer protocol to exchange files to and from a remote computer or network.
ftp> get README
To display the ARP cache entry for a specific IP address
$arp -a
a quick summary of every user logged into a computer
$w
is a program you can use to find information about computer users. It usually lists the login name, the full name, and possibly other details
$finger
enables you to log in to other UNIX machines on your network.
$ rlogin machinename