Most Used Linux Commands You Should Know! Part-1
3 min read
A lot of people find Linux more challenging as an operating system especially when they are coming from the comfort of using Windows or macOS. Here, I'm presenting you the basic but very important Linux commands to give you an in-depth knowledge of how to use your Linux terminal.
This command displays the id of the user logged in. It is a way to check if you are logged in with the right account before performing any operation.
This command displays all the users logged into the linux server
This command creates a new directory "dir1" in the server.
mkdir -p d1/d2/d3/d4
This command creates sub-directories, just use the parent (-p)
This command removes an empty directory from the server.
rm -r dir_name
This command removes a directory which has files and sub directories from the server.
This command is used to navigate from one directory to another directory.
"." represents current directory ".." represents parent directory "~" represents home directory of current user Example: cd ~ will take control to home directory of current user
This command creates empty files in the server
touch file1 file2 file3
This command creates multiple empty files in the server. Note: It can also be used for updating the time stamp of the files.
cat > file_name
This command creates files that can store some data in the file. To come out of cat command (ctrl+d). This represents EOF(End Of File). Note: a) cat creates a new file if the file is already not present. b) It will overwrite the content of the existing file if file is already present.
This command displays the content of a file.
cat >> file_name
This command appends data to an exisiting file. Enter some data and press "ctrl+d" to exit.
This command removes a file from the server.
This command displays the home directory of current user.
The key is to use these commands more often in your daily activities. Once you master these commands, it becomes your best ally, and you won’t regret choosing it as your daily driver.
One of the remarkable things about Linux is that even if you’re an experienced user, you’ll never stop learning to be more productive using it.
There are a lot more helpful Linux commands. If we’ve left something out, please share your favorite Linux commands in the comments below!
Community and Social Footprints :
Did you find this article valuable?
Support Cloudnloud Tech Community by becoming a sponsor. Any amount is appreciated!