Linux | Part 1
In this blog I am going to discuss briefly about Linux OS, its architecture and basic commands used to interact with Linux OS.
What is Linux:-
The full form of LINUX is Lovable Intellect Not Using XP. Linux was built by and named after Linus Torvalds.
Linux is an open-source operating system (OS), An operating system is a software that directly manages a system's hardware and resources, like CPU, memory, and storage. The OS sits between applications and hardware and makes the connections between all of your software and the physical resources that do the work.
Linux provides many advantages over other operating systems: Open-source software is available for everyone to contribute, modify, and enhance the source code. It is also available for users to download and use for free. Linux is less vulnerable and more secure than Windows operating systems. Many devices you probably own, such as Android phones and tablets and Chromebooks, digital storage devices, personal video recorders, cameras, wearables, and more, also run Linux. Your car has Linux running under the hood.
Popular Linux distros:-
1) CentOS
2) Fedora
3) Kali Linux
4) AMI by amazon
5) Debian
6) Gentoo
7) Ubuntu
8) RHEL
Linux Architecture:-
Applications layer: 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.
Shell: A Shell provides you with an interface to the Linux system. It gathers input from you and executes programs based on that input. When a program finishes executing, it displays that program's output. Shell is an environment in which we can run our commands, programs, and shell scripts.
Kernel layer: The kernel is the core of the operating system and is responsible for managing the resources of the computer, such as the CPU, memory, and I/O devices. It also provides services to the other components of the operating system and acts as the intermediary between the hardware and the software layers.
Hardware layer: This is the bottommost layer of the Linux architecture and represents the physical hardware components of the computer, such as the processor, memory, and storage. The hardware layer is responsible for interacting with the various hardware devices and providing access to them for the rest of the operating system
1) How to check hostname:-
2) Check your present working directory:-
3) List all the files or directories including hidden files:-
ls -l
--> list the files and directories in long list format with extra information-
ls -a
--> list all including hidden files and directory
ls -i
--> list the files and directories with index numbers inodes
ls -d */
--> list only directories.(we can also specify a pattern)
-
cd path_to_directory
--> change directory to the provided path
cd ~
or justcd
--> change directory to the home directory
cd -
--> Go to the last working directory.
cd ..
--> change directory to one step back.
-
cd ../..
--> Change directory to 2 levels back.
Make a new folder "newfolder"
-
Make a hidden directory (place . before a file to make it hidden)
-
Make multiple directories at the same time
-
Make a new Folder in a specific location
-
Make a nested directory and display in tree mode
-