Basic Commands
Last updated
Last updated
While performing a task, we all need shortcuts. Shortcuts help us to complete a task quickly. Linux comes with such commands which are one to two words, using that commands, you can perform several operations in no time.
As a beginner, you must be aware of those basic Linux commands to complete an operation in a short time in the Linux-based operating system.
Linux commands are a type of Unix command or shell procedure. They are the basic tools used to interact with Linux on an individual level.
Linux commands are used to perform a variety of tasks, including displaying information about files and directories.
ls command
The ls command is commonly used to identify the files and directories in the working directory.
There is a lot of flexibility offered by this command in terms of displaying data in the output.
pwd command
The pwd command is mostly used to print the current working directory on your terminal.
Now, your terminal prompt should usually include the entire directory. If it doesn’t, this is a quick command to see which directory you’re in.
cd command
The cd command is used to navigate between directories.
It requires either the full path or the directory name, depending on your current working directory.
mkdir command
This mkdir command allows you to create fresh directories in the terminal itself. The default syntax is mkdir <directory name> and the new directory will be created.
rmdir command
The rmdir command is used to delete permanently an empty directory. To perform this command the user running this command must be having sudo privileges in the parent directory.
touch command
The touch command creates an empty file when put in the terminal in this format as touch <file name> .
rm command
rm command in Linux is generally used to delete the files created in the directory.
You can see as we wrote the ls command to view the files in the terminal and then rm <file name> to delete the files and again we had the ls command to check the update.
echo command
echo command in Linux is specially used to print something in the terminal
man command
The man command displays a user manual for any commands or utilities available in the Terminal, including their name, description, and options.
cat command
The cat command is the simplest command to use when you want to see the contents of a particular file.
The only issue is that it simply unloads the entire file to your terminal. If you want to navigate around a huge file, should use less command alternatively.