Day-to-Day useful Linux commands

 

Day-to-Day useful Linux commands

Here the list of day to day useful Linux commands
 
 
 
 
Displays ipaddress from /etc/hosts file
#hostname -i
 
Displays domain name from /etc/hosts file
#hostname -d
 
Command to find folder size
#du -sh
 
Used to determine wireless is enabled or not&configure a wireless network interface
#iwconfig
 
Command used to bring up the eth0 interface down
#ifconfig eth0 down
 
Command used to bring up the eth0 interface up
#ifconfig eth0 up
 
Command used to print sequence of number from 1 – 25
#seq 1 25
 
Inform the OS of partition table changes
#partprobe
 

Command to Open pdf file from Command Mode

#acroread Desktop/Books/Bash-Beginners-Guide.pdf &

 
Command used to open Web Page from Command mode
#links
 
Command used to get in to tutorial in VIM editor
#vimtutor
 
Command used to find Spelling mistake in a file
#aspell list < newfile
 
Command used to change between  Virtual terminal
#chvt 1
 
Command used to view a file content in reverse order
#tac
 
Command used to display an image from command mode
#display test.png
 
Command to convert pdf to any format
#convert bash.pdf pash.jpg
 
Redirecting Output to another pesto terminal
#cal > /dev/tty3
 
Delete the first line from the file file.txt
#sed -i 1d file.txt
 
Delete the fifth and Sixth line of file file.txt
#sed -i 5,6d file.txt
 
Way to empty a file
#cat /dev/null > test.txt
 
Way to empty a file
#echo  > test.txt
 
Command to find out how many lines, word and letters in the file Rajkumar.sh
#wc Rajkumar.sh
23  449 3535 Rajkumar.sh
(It shows the number of lines, words, letters in the file Rajkumar.sh)
 
command to redirect man page output to a txt file
#man set | col -b > bultincommands.txt
(or)
#man set > set.txt
 
command to change man page to pdf file
#man -t sendmail | ps2pdf – sendmail.pdf