Let's learn about basic Linux
Linux
The command prompt in Linux can be intimidating. It’s one of the reasons many people avoid trying Linux if they come from a Windows or Mac environment.
Linux is a family of free and open-source operating systems based on the Linux kernel. Operating systems based on Linux are known as Linux distributions or distros. It's also one of the most popular operating systems in use today, with millions of users worldwide.
Linux was created by Linus Torvalds in 1991 and has since grown into an enormous community of developers who contribute code to improve its performance, stability, and usability.
Flavours of Linux are Debian, Ubuntu, Fedora, CentOS, Arch Linux etc. Linux is name OS and it's Kernel too.
Today, 90% of all cloud infrastructure and 74% of the world’s smartphones are powered by Linux.
Linux Architecture
The Linux architecture is largely composed of elements such as the Kernel, System Library, Hardware layer, System, and Shell functions.
#Kernel
Kernel is the heart of the operating system. It is an interaction between software applications and hardware. It manages the operations of the computer and the hardware, most notably memory and CPU time. It is an integral part of any operating system.
#Hardware
Most of the users of Linux face an issue while using Linux. Various companies of hardware prefer to build drivers for Mac or Windows due to they contain several users than Linux.
#Shell
Shell is an environment in which we can run our commands, programs, and shell scripts. It is a user interface for access to an operating system’s services.
#Application
This is the topmost layer of the Linux architecture and consists of the various applications that run on the operating system. These can be anything from productivity software and games to web browsers and media players.
Linux file Directory system
Linux everything is represented as a file including a hardware program, the files are stored in a directory, and every directory contains a file with a tree structure. That is called File System Hierarchy.
Root Directory represents with (forward slash) It is a top-level directory in Linux. The base of the Linux directory is the root. This is the starting point of FSH. Every directory arises from the root directory. It is represented by a forward slash If someone says to look into the slash directory, they refer to the root directory.
Basic Linux commands
Here are some basic Linux commands that you may know must.
Pwd: print work directory. Gives the present working directory.
ls: it shows available files and directory list in the present working directory
ls - l: list the files and directories in a long list format with extra information.
ls -la: list all including hidden files and directory
uname: it shows the name of the kernel
uname -r: it shows a version of the kernel
cd: to change the directory
clear: use to clear the screen
whoami: currently login user
history: it shows the list of previously used commands
date: current date and time
Create a single directory
mkdir niloy
To Create multiple directories
mkdir nahid niloy devops
To create a single file
To create several files
touch test_file{1..10}.txt
Day 2 Task: Basics Linux command
Check your present working directory:
pwd: print work directory. Gives the present working directory.
- List all the files or directories including hidden files.
ls - l: list the files and directories in a long list format with extra information
ls -la: list all including hidden files and directory
- Create a nested directory A/B/C/D/E
mkdir -p A/B/C/D
-p means the path of directories.
Thank you for reading this blog. I hope you learned something new today! If you found this blog helpful, please like, share, and follow me for more blog posts like this in the future.
-Happy Learning !!!