Linux is one of the most powerful open-source operating system kernel that serves as the foundation for various Linux-based operating systems, commonly referred to as Linux distributions.
Today onwards I will be sharing the most important Linux commands that are from basic to advance. I will be referencing the Linux Bible written by "Christopher Negus" in this journey.
Linux Terminal
The most important in LInux for devops is the terminal which is majorly in action all the time. Every task is performed only through the terminal though the GUI is available. Lets see the terminal of Linux.
The terminal looks in this way. Lets breakdown the displayed metavalues
subash: The first word "subash" is the username of the user who uses the system
subash07: This is the computer name
projects: This is the directory currently we are in i.e. we are inside the projects directory(folder).
$: This sign indicates that the current user is the common user. It means that the user is not a root user ( for the root user the sign will be "#")
Most common commands that I figured out today while exploring the Linux Bible are curated as follow:
whoami - This command will be print the username used in the system where the command is currently being executed.
pwd - This command will print the present working directory. As we can see in the above scrreenshot while we are in project directory. If we run the command as pwd the output will be as "/home/subash/projects" .
ls - This command will list (displays) all the files and directories.
ls -l - This command will print the files and directories with the long listing format. It will consist file permissions , file owners date and time .
ls -a - This command will list all the files and directories along with hidden files.
man - This is the manual page for any coomand. man with any command will shows the full explanation of the command usage.
syntax: man command
help - This also helps to get the detailed information for the any command.
syntax: command --help
example: date --help
Locate: This command is used to find the path of the file/command.
Along with these there are variables used by default in Linux. The values can be displayed using echo command
Example: echo $USER #subash will be printed as the user.
some variables are:
echo $PATH #displays default path for a regular linux user.
hostname #computer's name or machine name
These are the basic commands that we look on day 1. These commands can be easily executed.. Practicing the codes makes the perfect. Keep Learing along with us.
Thank YOu