Top 10 Linux Commands

Top 10 Linux Commands
Written by Sumit jalanJune 25, 2021
5 min read
Linux Administration
7 VIEWS 2 LIKES 1 DISLIKES SHARE
2 LIKES 1 DISLIKES 7 VIEWS SHARE
Sumit jalan

Devops Engineer

Top 10 Linux Commands

1. pwd
The pwd command stands for "print working directory" and will return your location in the file system, such as /usr/share or /home/matthew. This is useful if you forget where you are.

2. ls
When used alone, the ls command lists all of the files and directories contained in your current directory. You can also use ls to list the contents of a directory you have not navigated to by adding the directory location after the command, like this: ls etc/python.

3. cd
The cd command changes your working directory to a directory you specify. For example, cd /var/log takes you to the log directory that is contained in the var directory.

4. touch
The touch command creates an empty file using the filename you specify. Create a file now and then use cd to confirm that it was created in your current directory: touch examplefile.

5. rm
The rm command removes a file. To delete the file you just created, enter: rm examplefile.

6. mkdir
The mkdir command creates a directory. Create a directory now and then use cd to confirm that it was created in your current directory: mkdir exampledirectory.

7. rmdir
The rmdir command removes a directory. To delete the directory you just created, enter: rmdir exampledirectory.

8. mv
The mv command moves a file or a directory you specify to the location you specify. It is also used to rename files and directories. You can do both at the same time, if you like. For example, let's move a file named sample from our current working directory into an existing subdirectory called stuff while changing the name of the file to example: mv sample stuff/example.

9. cp
The cp command copies a file or directory you specify to the location and new filename you specify. Let's use the same example: cp sample stuff/example. The difference between what happens here and what happened with mv is that with cp, the original file remains.

10. man
The man command displays the manual page for the command you specify. Every command I have mentioned in this short article can do much more than you have learned thus far. In fact, we have just scratched the surface. Most commands have options, called switches, available to modify the default behavior. For example, when you enter man ls and view the man page for that command, you will learn about incredibly useful options like ls -al which will list not only file and directory names, but also very useful metadata about each file and directory.

Linux
Commands
Basics
7 VIEWS 2 LIKES 1 DISLIKES SHARE
2 LIKES 1 DISLIKES 7 VIEWS SHARE
Was this blog helpful?
You must be Logged in to comment
Code Block

1 Comments

Erik Lian

Thank you for sharing this blog, it is really usefull.

Sumit jalan
Devops Engineer
1 Blog Posts
1 Discussion Threads
Trending Categories
39
Software1
DevOps17
Frontend Development4
Backend Development2
Server Administration1
Linux Administration6
Data Center0
Sentry0
Terraform2
Ansible0
Docker2
Penetration Testing0
Kubernetes0
NGINX0
JenkinsX0
Jenkins2
SSL0
Ethical-Hacking1
Python0
NodeJs1
RedHat0
Github0
AngularJs0
Google Cloud Platform (GCP)0
SonarQube0
Amazon Web Service (AWS)0
VMware0
Blockchain0
Snipe-IT1
MongoDB1