Getting Started with Linux Shell commands
In this article, you will understand how to get started with Linux Shell Commands. You will run the first few commands in Linux using Linux Shell or Terminal.
👨🏽💻🧑🏻💻FOLLOW our publication for more articles on 📍DevOps Engineering on Cloud
Running the first command on Linux
The first command you are going through is uname.
The uname the tool is most commonly used to determine the processor architecture, the system hostname, and the version of the kernel running on the system.
The syntax of the uname the command takes the following form:
🚨👉🏼 You can also check the complete udemy course (Linux Shell Commands for Absolute Beginners using Ubuntu 20x)🔗Referral link
This command is mainly used to get the details of the Operating System.
The most used command in Linux is cd.
The cd command, also known as chdir (change directory), It is a command-line shell command that changes the current working directory in various operating systems. It can be used in shell scripts and batch files.
📌 Whichever directory you are in if you type cd it will take you to the home directory, For example, check out the below snippet👇🏻
As I logged in as a root user my home will be /root
The home directory is always referred to by ~(tilde)
root@e3c6a4051512:~#How to get help on the Linux terminal?
Googling everything is hectic nowadays as there are millions of answers for the same question on google, It will be very time-consuming to get the relevant answers due to a lot of distractions on google. So, The most effective way to get help with Linux commands is by using the --help
The --help command will give the complete description of the particular command and the list of control arguments that can be used along with the command. As shown in the above code snippet 👆🏻
Overview of Files and folders in Linux
Files contain the data or contact related to the extension it has. For example. an Mp4 file will contain the video, a CSV file contains the data, a pdf which contains the data, etc…
Get Vamsi Penmetsa’s stories in your inbox
Join Medium for free to get updates from this writer.
Whereas the Folder contains multiple files, Folders can also contain multiple folders in it. In Linux, folders are called directories.
📌 Fully Qualified or Absolute Paths
An absolute path is defined as specifying the location of a file or directory from the root directory(/). In other words, You can say that an absolute path is a complete path from start of actual file system from / directory.
📌 Relative path
Relative path is defined as the path related to the present working directly(pwd). It starts at your current directory and never starts with a / .
As you understand the basics of the files and folders, In the following video timestamp you can understand the Fully Qualified or Absolute Paths and Relative Paths of Files and Folders👇🏻
If you execute the ls -ltr command on the terminal you will get the full list of files and folders in the present working directory. You can confirm between files and folders by looking at the first character of the output. If it isd(directory) then it's a folder.
You can navigate through the different folders by using the cd command. cd .. will take you back to the parent directory from the present working directory, where you are in. For example, I can navigate from documents to the downloads folder by using the following command shown in the code snippet below
cd .represents the current directory andcd ..represents parent directory from the current working directory
Overview of the history of Linux shell commands
History command in Linux is a very helpful command. Just you need to hype history in the terminal to get all the previous commands you have used in the Linux terminal. You can navigate through the commands which are displayed on the terminal after typing history by using the up ⬆️ and down ⬇️ arrow keys on the keyboard in reverse chronological order.
You can also use shortcut
ctrl + rfrom keyboard after typinghistorycommand for (reverse-i-search) or (bck-i-search)
A more detailed explanation of the history command is in the below video timestamp👇🏻
🙏🏼Thank you, for reading the article. If you find it valuable please follow our publication DevOps Engineering on Cloud
🚨👉🏼 You can also check the complete udemy course (Linux Shell Commands for Absolute Beginners using Ubuntu 20x)🔗Referral link









