30+ Most Useful Linux Commands

In this tutorial i will described some of the useful and important Linux command for Linux user.These command are normally we used for operate Linux system, Here we will show each command with example.
Linus very popular operating system for hosting server.We have taken all most useful Linux command for Linux beginner user.I have taken all Linux commands which used in Linux terminal,so these command also known as Linux terminal commands.

You can also check other recommended Linux tutorials,

Linux cd Command – Use to change directory

This command is used to change directory.

# cd ../..
//down two directory

Linux pwd command

pwd command return current working directory.

# pwd

Linux service Command

service command call script located at /etc/init.d/ directory and execute the script.

# service httpd start
# /etc/init.d/httpd start

Linux free command

free command shows free, total and swap memory information in bytes.

# free

Crontab Command -List All cronjob in Linux

List schedule jobs for current user with crontab command and -l option.

# crontab -l
//edit cron tab
# crontab -e

Less Command:

This command used to view quickly file. You can page up and down. Use ‘q‘ to quit from less window.

# less error_log.log

Linux More Command

This command used to view file and shows details in percentage. You can page up and down. Press ‘q‘ to quit out from more window.

# more error_log.log

Linux vi Command

This command is used to read/write file on command window.

# vi test.php

Linux vi Command – Read Only

This command is used to read/write file on command window.

# vi -R test.php

Linux Go to specific line

This command is used to read/write file on command window.

# vi +112 test.php
//112 line number

Linux Go to specific function

This command is used to read/write file on command window.

# vi +/test test.php
//will go test() fucntion

Note: Press 'i' to write into file and 'q' to quite without save and ':wq' with save.

Linux mkdir Command – Create Directory in Linux

mkdir command is used to create directories under Linux.

# mkdir directoryname

Linux CP Command – Copy file in Linux

This command is used to copy file from source to destination preserving same mode.

# cp -p fileA fileB

Linux mv Command – move file in Linux

This command is used to rename fileA to fileB. -i options prompt before overwrite.

# mv -i fileA fileB

Linux Cat Command – View file in Linux

cat command used to view multiple file at the same time.

#cat fileA fileB

Linux rm command – Remove file in Linux

rm command used to remove or delete a file without prompting for confirmation.

# rm filename

Linux Grep Command – Search string in file

The grep command is used to search a given string in a file. we can use '-i' option for ignoring case sensitive.

# grep test fileB

Linux Find Command – Searching files in Linux

find command used to search files, strings and directories.

# find test fileB

Linux ps Command – View Linux Process List

ps command displays about processes running in the system.

# ps

Linux kill Command – kill process in Linux

Use kill command to terminate process.

# kill- 9 7508
//this will kill 7508 process id.

Linux Uptime Command

This command is used to shows since how long your system is running and the number of users are currently logged in system.

# uptime

Linux W Command – Display Logged-in User Process in Linux

It will displays users currently logged in and their process along-with login name, tty name, remote host, login time, idle time, JCPU, PCPU, command and processes.

# w

Users Command -Display Logged-in Users in Linux

Users command displays currently logged in users.

# users

Whoami Command -Print Current Logged-in User Info in Linux

whoami command print the name of current user.

# whoami

How to import Database in mysql

$ mysql -u root -p db_live < db_live.2011-11-21.sql02

Find file listing of Directory

$ ls -l

How to Extract file in Linux

$ gunzip db_live.2011-11-21.sql.gz

How to edit file in Linux

$ vim /etc/my.cnf

How to restart mysql in Linux

$ /etc/init.d/mysqld restart

How to check hostname in Linux

$ hostname

How to update Linux

$ sudo apt-get update

How to search file based on extension in Linux

$ locate *.deb(search all deb files)

How to install software in Linux

$ sudo apt-get install softname


We have leran basic command of Linux.We have see basic use and example of most popular and useful Linux commands.You can also said that its linux command cheat sheet for Linux beginner user.