Backstory As I was getting involved with technologies and knowing more about what our machines run and how effectively we can complete our tasks using better technologies which in our case is using a better OS that runs . Linux Well, how did I know it was better, I wasn't even using it back then, that's where the help us in guiding our way through the hurdles, contribute to our life and make them better. tech communities In my case using my PC with optimal performance saves my time, and makes my day productive. Then came the help, "Hey buddy, in that case, you should try using Linux and see if it helps you in any way to make your day better also learning how it works have its perks." that is how I got started. SETTING UP THE ENVIRONMENT TO RUN LINUX Before I started learning about Linux, I started setting up the environment for my PC to get it Linux-based. Install Linux on Windows with WSL2 or Using a Virtual Box Running Linux alongside Windows i.e Dual Boot For to use it as a Primary OS, I found Dual Booting much better than the first two methods, considering all the suggestions/advice on Linux, I was in to use Linux at its best and found dual boot is the best way possible. It just took more time and patience, reading the documentation carefully, following the instructions and I was good to go, It was completely worth it since I wanted the best experience of using Linux. But it's not all Pros, the dual booting method has its Cons too, and the process has its . Risks Choosing the distribution for Linux Here I didn't take much time on selecting a to run Linux. distro a.k.a distribution Here are some widely used distros for the following categories: Server Red Hat Enterprise Linux (RHEL) https://www.computerhope.com/jargon/c/console.htm CentOS Ubuntu Server Suse Linux Enterprise Server(SLES) Debian Desktop Ubuntu Fedora Linux Mint Debian Embedded isn't an embedded Linux distro, what it does is that it provides the necessary tools, templates, and methods to help us to create a custom Linux-based system for embedded system deployments in connected servers, virtual environments, etc. for any type of /regardless of hardware architecture. Yocto OpenEmbedded Android These are not the only distros just the widely used ones, there are almost one thousand distros as of now maybe even more, you can know more at . Distrowatch I fall into the desktop category so I took the obvious choice i.e Ubuntu, also because I preferred the modern and standard desktop interface. Do you know the actual extent one can go with Linux, is building their distribution, for a person who is at a master-level of of Linux and uses a distro like is quite the challenge they would look up to. It's possible, we need to put on a lot of work for it and we will. System Administration Gentoo As of now, that's all for the setup part. Then enters the switch par from for dual-booted systems, it was quite simple I must say and that's it for setting up Linux on your PC. Windows to Linux That's Good, but I want to know more about Linux. What is Linux and Why use it? Firstly, I've found that what I now use isn't just Linux it's , yes it is. But why, isn't Linux an OS? Well, It is, as and it is core which as a kernel is just as it is. GNU/Linux GNU/Linux Linux So Linux is a free OS it's a key component for an OS and in here which is , our system which we say Linux-based is Kernel GNU The OS GNU/Linux System Even our system agrees with it, to know that open your terminal and type the command: , you should get the output similar to this Ctrl + Alt + t uname -a Linux is constantly evolving both at the technical, including kernel features, distributions, and interface level. Unlike other OS which is also not and take several months for an update, it's frustrating if it has bugs. We have battled with slowdowns, crashes, malware, and viruses until the next update is released. Open-Source Software consists of: GNU/Linux OS Bootloader The Linux Kernel System User Space/Kernel space Applications Some common terminologies to know before we enter: : It is considered the brain of the GNU/Linux operating system. It controls the hardware and makes the hardware interacts with the applications know more at . Kernel Kernel.org : It's a collection of programs combined with the Linux kernel and package management system to make up a Linux-based operating system. Ex: RHEL, SUSE, Ubuntu, Fedora, etc. They are variants of GNU/Linux OS. Each has a different approach to a Desktop, I just had to pick one which matches my needs. Distribution a.k.a Distro A Linux OS has GNU Shell utilities, Linux kernel, graphical desktop environment, and more : A program that boots the operating system, let's get that even more clear when we power on our PC/laptop, a basic standard check is done a.k.a Power On Self Test(POST) did you ever see a speedometer of a vehicle, technology is being used in it Boot Loader When you put the key in and turn on the ignition mode what you see is that it flashes the numbers, the meter raises or the needle rotates fully and gets back to its default speed, what happened in there was a system check, this is an example since embedded systems are used in them and what powers them is Linux When we power on the which is the chip that consists of all the set instructions that are needed to do the system check before we run the programs BIOS ROM(read-only memory) After that when the computer starts up the first it read was bootloader and it points to the program which is going to run next It's like when you are bootstrapping yourself the first thing you do is to tug your lace-up, so just awake enough to get the OS started. It is also the earliest process to happen in the Boot Process : Well, it's one of the first few thoughts that comes into my mind when I hear or say Linux. Command-Line Interface a.k.a CLI Now an OS kernel is wrapped with a shell, to perform tasks by accessing the kernel we need commands to pass through the shell or more like an orb that needs commands to penetrate through to get control of what's inside and show us the effect of it, so it is the shell that interprets the commands and instructs them to the OS, some shell examples are bash which is widely used, bourne, Korn and z shell : Now the terminal is where we access the OS kernel to perform tasks, this is the command-line interface that I was talking about, it is the arena to use our weapons well in technical terms it is where we access the system through a shell using commands in this environment. Let's start using them. Terminal Opening the Terminal Press the Windows key and the search pops up, type "terminal" OR right-click on the desktop home page and click the open terminal option OR use ctrl + alt + t Point to remember: Linux commands are case-sensitive. A terminal is a text-based environment but since we use this in an OS, we get a some of them have very few features of GUI available in the terminal we now use. GUI a.k.a Graphical User-Interface But a is the environment, which in our case a console in our Linux-based system is a pure text-based environment with no scope for GUI, you can access it with if we want to open up/access multiple consoles we can do it with like 1-8 is the number for the console, depending on which you want to open it. Console Ctrl + alt + F1 Ctrl + Alt + F1-F8 If you're going to try it, type the command to exit from the console, wait for a few seconds, and you'll be back to your system login page. exit Let's get back to the terminal What does this mean? Here's is the username name and after the which is is the hostname kiransatyaraj @ jksrtwt A Linux-based system can have multiple users for the same host and you can also change the hostname The terminal emulator which I'm using is Terminator, you can install it using the command: sudo apt update && sudo apt install terminator After the semicolon, the characters represent the user's home directory, what lies in that position is the file path, after the the sign we can start writing the commands. ~ $ https://twitter.com/jksrtwt/status/1541774775952896002 Basic Commands - change directory, - list, - present working directory, - root directory, cd ls pwd / ~ - home directory As you see in the image the output of is a path which means that starting from - root directory inside that we have a inside that, we have a user directory of name pwd /home/kiransatyaraj/ / home directory kiransatyaraj - list which lists all the directories of the current directory you are in. ls is the bash way to print hello world into the console here echo is the command name, and "Hello, World!" is the argument echo Hello, World! using just gets you back to the user's home directory and you can change the directory that you want to work with using of the directory like cd cd <filepath> cd Documents/ to change back to the previous directory, to change back to the parent directory, cd - cd .. We use flags to get detailed specifications, - lists all the files also the hidden files because any file that starts with a dot (.) is hidden ls -a Flags are like options for a given command for the specification we like to see, we use double hyphens for the word flags and single hyphen for the character flags -- - We can also group the character flags and can provide arguments which in this case is the argument and we are in the parent/user's home directory - hello/ Let’s clear the clutter using the command, which clears the page for you, and is used to expand the browser until you can use it from the top clear Ctrl + l Man page Now how do we get to know the option available for a command, that is possible with the man command, now what is man, let's ask about using man man man which leads to a page about the manual command you can get additional typing when you're on the manual page, to quit from it just typing twice will do the job. h q While you are reading the documentation you can scroll through the page using arrow keys but if you want to scroll down as one window will help you and for scrolling up one window at a time and to get to the very beginning of the page type and to the very end of the page , to search for a specific keyword type while you're on the manual page and type the word or a letter and press , the matches in the current will be highlighted Ctrl + f or space Ctrl + b g G / enter To navigate through the page of the keyword you searched for on the manual page press to get to the next match and for the previous match n N or Shift + n Using the search starts from the beginning of the page, to search from the end of the manual page and you know the drill what to do next / Commands are two types, some are executable files, they have a file path in the system and manual and some are builtin commands they do not have a manual like cd, alias, and more To know the type of command, we use type <command-name> To get the documentation of such builtin shell commands, we use help <command-name> help does not work on the executable file commands like try it won't work, is only for shell-builtin commands but we have a hack, use it works for all the commands no matter what the type is. help ls help <command-name --help> or to find the command, feature, keyword man -k <command-name> apropos <command-name> TAB key Use the key for auto-completion of a command, folder, or a directory TAB Type the first few letters of the command you want to execute and press the key, if there's a single match the command will be auto-completed, if not press the key twice to see all the matches for the first few letters of that command TAB Terminal Shortcut keys Navigating through all the commands you ran before using the keys and press enter to run them up and down arrow to exit the bash shell/close the terminal, to remove the current line, to move the cursor to the start of the line, and In the end, to stop the execution of the command exit or Ctrl + d Ctrl + u Ctrl + a Ctrl + e Ctrl + c BASH History stores the history of all the commands as a directory in the user's home directory, to know how many commands the systems stores in it which is 2000 cat .bash_history echo $HISTFILESIZE to print out the entire history of all the commands you ran, controls how many commands from your bash history will be stored in the memory history echo $HISTSIZE shows the current history of the commands but the user's bash history files are updated when the user is logged out Before logging out history It's updated after logging in, for printing out the user's command history files use cat .bash_history Commands are numbered when we print out the history using , so to run a certain command of number we use , take a look at the picture below history !<number from history's command-line> To re-run the previous command use and to run the last nth command from the history use !! !-n Running the last command that starts with "XYZ" use and for printing that command !XYZ !XYZ:p To search the commands from the history use and start typing, if you found the command press , or if you want to exit and clear the line press Ctrl + r enter Ctrl + G To delete a command line from the history use and to erase the whole history use history -d <line_number> history -c To run commands without leaving a trace is to use space before typing a command and check the history if the command you ran is not in the history then you’re good If it does not work then use it works only for the current session to save the changes using $HISTCONTROL=ignoreboth echo “HISTCONTROL=ignoreboth" >> .bashrc Thank You so much, you made it till the end, and giving your time means a lot to me, I hope you found this blog helpful and we'll meet again with another blog on "Linux File System" starting with root access, why wait till the next blog you can connect with me on . Twitter YOU ARE AWESOME!! HAVE A GREAT DAY BUDDY