Linux is the most powerful and most secure operating system in the world. If you are a computer user or if you are a program developer then you will surely know Linux word from anywhere. If yes and if you want to use Linux as your primary operating system then you must know Linux terminal CLI. The Linux terminal commands are a most important way to use Linux as your primary operating system and if you are a newbie or if you are a programmer then you must know this below commands in your Linux operating system.
These are the basic terminal commands which are very useful in your entire life.
ls(basic Linux commands)
This command is used to list files available in your Linux operating system. If you are in the root folder then you can type ls command in your terminal. you will see list of the files available in the root folder. For example: as you see in the image below I have entered ls command. it is showing currently available files in my root folder.
cd(basic Linux commands)
If you want to change directory from the terminal then you can use cd(change directory) command in your terminal. For example, I have entered cd space change directory name as a command in the terminal the cursor route me to the new directory.
ls -a(basic Linux commands)
If you want to show hidden files in the particular directory then you can use ls -a command to show hidden files in the particular directory. For example, I have typed ls -a command then it is showing me hidden files in the particular directory.
man(basic Linux commands)
The man command is actually used for showing documentation of particular command for available application documentation. For example, I have typed man space man as a command it is showing man documentation in the terminal.
If you want to create a folder through terminal then you can use mkdir for creating directory or folder. This is a much faster way than creating a folder through the user interface.
If you want to move a certain file from one place to another place then you can use move command in your terminal.for example, as you can see I have put move space source directory space destination directory in the terminal then my file is moved to the new directory.
the rm command is used for removing files from a particular directory. For example, if you want to move this file from your degree then I have put rm space filename in the terminal that the file is got deleted.
the rmdir command is used for removing the directory from a particular folder. for example, if you want to remove this folder from a specific folder then you can use rmdir space folder name in your terminal.
The touch command is used for creating a particular text file DOC file or any text file using the terminal. For example I have entered touch space filename.txt then I entered then the text field is got created this is the fastest way from creating text file from the user interface.
Clear command is used to clear the uncluttered data from the terminal. for example, as you can see in the below image there are multiple data on the terminal after putting clear command the terminal got cleared and as you can see terminal is showing a very clear way.
CP command is used to copy a file or directory folder from one from source to target. For example, as you can see in the image below I have typed CP space source space target name after entered the file is copied to the destination folder.
Uname -srm command is used to show the current Linux version.
chown command transfers the ownership of a file to the user with the given user name.
chmod command is used for or transferring the permission of the specified file into as per read-write executive for set bit position.
locate command is used to search a particular file within a particular directory or particular whole system in the Linux operating system. for example in the terminal window, I have typed locate space filename after entering it will search the file and it will show the result where it is located.
the cat command is used for showing the contents of the particular file in the terminal it is the fastest procedure for showing the content in the terminal.
passwd the command is used for setting the new password to the current session or current user for example as I have typed passwd in the terminal window after that it will ask for current password and the new password you will see the result in the below image.
The su direction is utilized to turn into another client during a login session.
grep command is used for searching a particular text from a given file it will give you a result in the form of line number where you can find the selected text and it will give result in the terminal.
this command is used for showing the current IP address of the system India Linux operating system.
The df (plate free) direction, when utilized with no alternatives, shows data about the absolute circle space, the plate space as of now being used, and the free space on all the mounted drives. In the event that a catalogue is determined, the data is restricted to the drive on which that index is found.
This exit command is used for exiting from the current window. for example, as you can see in the terminal window I have typed exit after that it will close the current window.
this command shows the history where which commands we have used previously in the terminal.
this command is used to kill the current process of the system.
Ping command is used for networking purpose. By using ping command you can see whether the particular host in reachable from your PC.
the pwd command shows the current working directory.
the shutdown command is used to turn off your current system.
This command is used for remotely connecting to your destination host by using SSH space hostname.
Linux commands list
|cat [filename]||Display file’s contents to the standard output device|
(usually your monitor).
|cd /directorypath||Change to directory.|
|chmod [options] mode filename||Change a file’s permissions.|
|chown [options] filename||Change who owns a file.|
|clear||Clear a command line screen/window for a fresh start.|
|cp [options] source destination||Copy files and directories.|
|date [options]||Display or set the system date and time.|
|df [options]||Display used and available disk space.|
|du [options]||Show how much space each file takes up.|
|file [options] filename||Determine what type of data is within a file.|
|find [pathname] [expression]||Search for files matching a provided pattern.|
|grep [options] pattern [filesname]||Search files or output for a particular pattern.|
|kill [options] pid||Stop a process. If the process refuses to stop, use kill -9 pid.|
|less [options] [filename]||View the contents of a file one page at a time.|
|ln [options] source [destination]||Create a shortcut.|
|locate filename||Search a copy of your filesystem for the specified|
|lpr [options]||Send a print job.|
|ls [options]||List directory contents.|
|man [command]||Display the help information for the specified command.|
|mkdir [options] directory||Create a new directory.|
|mv [options] source destination||Rename or move file(s) or directories.|
|passwd [name [password]]||Change the password or allow (for the system administrator) to|
change any password.
|ps [options]||Display a snapshot of the currently running processes.|
|pwd||Display the pathname for the current directory.|
|rm [options] directory||Remove (delete) file(s) and/or directories.|
|rmdir [options] directory||Delete empty directories.|
|ssh [options] user@machine||Remotely log in to another Linux machine, over the network.|
Leave an ssh session by typing exit.
|su [options] [user [arguments]]||Switch to another user account.|
|tail [options] [filename]||Display the last n lines of a file (the default is|
|tar [options] filename||Store and extract files from a tarfile (.tar) or tarball (.tar.gz or .tgz).|
|top||Displays the resources being used on your system. Press q to|
|touch filename||Create an empty file with the specified name.|
|who [options]||Display who is logged on.|
this is basic Linux command list. you can use these commands to perform basic tasks through the terminal and make hands with Linux CLI. if you like this article you comment in the below section.
you can also read this article if you like it.