10 most frequently used commands in Linux for beginners

I have been trying really hard to swim across the ocean of linux. There are a lot of beginners who ask me where to start with. To all the beginners of linux, I would like to write 10 most frequently used linux commands with a few examples and usage. Please note that the commands have a lot of options, which need to be explored by the user.

1. ls  : Stands for listing
Example : ls
Lists all the files in the current directory.
ls -l : Stands for long listing.
Example : ls -l
Displays a long list of files including file permissions, users, date and  time of file creation, file size etc.
ls -a : List all
Example : ls -a
lists all the files including the hidden files
2. mkdir  :Stands for make directory.
This command is used to create a directory.
Example: mkdir dirname

3. pwd :Stands for present working directory.
Example : pwd
Displays the current working directory that the user is in.
4. cp  :Stands for copy
Example: cp filename dirname/
copies file with filename to the directory dirname/
cp -r  :recursive copy
Example : cp -r dirname1/ dirname2/
copies the entire directory dirname1/ to the directory dirname2/
5. mv  :Stands for move
Example :mv filename1 filename2
Used to change the filename from filename1 to filename2 wihout changing the contents of the files.

6. find  
Example: find
lists all the files and directories in current directory recursively
Example : find dirname/
lists all the files in the directory with dirname/

7. rm   :Stands for remove
Example : rm somefile
removes the file with name ‘somefile’ in the current directory.
rm -rf    Stands for recursive forceful remove
Example : rm -rf dirname/
remove the entire directory with the dirname

8. cd  : Stands for change directory.
Example 1: cd ~/dirname/
Changes the current directory to /home/username/dirname/
Example 2: cd ..
Changes the directory to a previous directory

9.  df  : Stands for disk free
Example : df
Displays the entire disk space available.
 df -h   : Disk free in human readable form
Displays the entire disk space in terms of GB, MB etc.

10.  man  User Manual
Example : man command_name
man ls
gives the detailed description of the command with options.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s