In this article, you’ll find top 10 most popular Linux commands with example. Linux is robust operating system and can run with minimum specification ,that’s why company use Linux operating system (OS).
This command is widely used by experts and students on a daily basis and in company employee uses these commands in the terminal of Linux.
These various commands are related to directory command such as creating a directory, removing and copy the file, etc. Let’s go for it.
Top 10 Most Important Linux Command with example and syntax
1. mkdir
The first most useful command is mkdir which means make a directory in the current location or working directory.
it requires one-parameter, first type mkdir keyword and pass directory name that’s all directory with the given name will be created. mkdir command is used to create a directory in the file system.
Syntax:–mkdir directory name
Example–made movie
2. rmdir
As the name suggest remove directory it also requires one parameter first one is a keyword and other is directory name which we want to delete
if the directory contains subdirectory or files it won’t delete. – rmdir command is used to remove the directory
Syntax:–rmdir directory name
Example:;–rmdir movie
3. cd command in Linux
CD command means change directory which primary purpose is to change the current working directory.it requires two-parameter CD keyword and path that we want to change.
cd command is used to change the directory such C drive to Z drive
Syntax: cd directory name
example:- cd c
4. mv
when you want to move a file or rename the file mv command is used to full fill the goal.
mv command is used to move the file or rename the file.
Syntax:mv oldfilename newfilename
Example: mv student studentDB
5. cp command in Linux
cp command in Linux is used to copy the file from one directory to another. It requires two-parameter to copy the file. the first parameter is the source path and destination path. Read the syntax below to more clear about the copy command
Syntax:: cd path1. Path2
Explanation:–go to the directory where the file is kept and type cd filename path2.Path2 describe where the file should be copied
6. rm
If any file no longer is used and we want to delete it then rm command is used to remove the file.it require one parameter that is a file name or full path.
Syntax:- rm filename
To delete all file in current directory type rm *
7. pwd
In some case current directory working directory is required to know so pwd command can be used to get the current working directory. It does not require any parameter.
Syntax:– pwd.
8. touch
When we use cat command or nano command to create a file it automatically editor command will be open to writing the file, if we only want to create a file with empty data then touch command can be used to create a file in the current directory. touch Linux command is most important Linux command to just create an empty file within a second.
Syntax: touch filename
9. man
man command is used to get information about the command. it describe the option that can be used with the command.
Syntax: man commandname
10. find
the file command is used to search a file in the directory specified by the filename. It matches the file name, the extension of the file and other properties to search the file.
Syntax: find filename
We value your comment kindly comment below and give feedback to improve this site.
Have nice learning.