Introduction To Linux.
Linux is an open-source operating system, meaning it is free for anyone to use, modify, and distribute. It is based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is commonly used for personal computers, web servers, and many other applications. It is designed to be user-friendly and offers a range of features, including a graphical user interface, a wide variety of software applications, and compatibility with other operating systems
LINUX ARCHITECTURE
Linux architecture is comprised of four main components: hardware, kernel, shell, and applications. Hardware is the physical components of the computer, such as the CPU and motherboard. The kernel is the core of the operating system and manages the hardware and software resources. The shell is a user interface that provides access to the kernel's functions and other applications. Finally, applications are programs that the user interacts with to perform tasks.
what are kernel and shell in Linux?
The kernel is the core of the Linux operating system. It is responsible for managing system operations, memory, and I/O operations. It also provides a platform for applications to run on.
The shell is the user interface to the kernel. It is a program that provides the user with an interface for interacting with the system. The shell interprets commands entered by the user and passes them to the kernel for execution.
what is the Linux file system hierarchy?
The Linux File System Hierarchy is a logical arrangement of files and directories used by the Linux operating system. It is rooted in the root directory '/
' and organized in a tree-like structure that reflects the organization of files and directories. At the top of the hierarchy is the root
directory, which contains all other directories and files. Directly below the root
directory is the bin sbin usr
and lib
directories, which contain the executable files for the system. Below are the boot
and dev
directories, which contain files used during the boot process. The home
directory is where users store their personal files. The etc, proc
and var
directories contain configuration files and system data. The tmp
directory is used for temporary files. Finally, the mnt
directory is used for mounting external devices.
Linux basic commands with a simple example.
ls
– list directory contentscd
– change directorymkdir
– make directoriesrmdir
– remove directoriesmv
– move or rename files or directoriescp
– copy files or directoriesgrep
– Search for patterns in filesman
– display manual pages for commandschmod
– change access permissions for files or directoriesfind
– Search for files by name or other criteriatouch
- to create an empty fileecho
- to write text to displaycat
- to display text on a file
Examples:
ls – ls -l /home/user
(list the contents of the home directory)cd – cd /usr/bin
(change the current directory to /usr/bin)mkdir – mkdir new_folder
(create a new directory called ‘new_folder’)rmdir – rmdir old_folder
(remove the directory called ‘old_folder’)mv – mv old_name new_name
(rename a file from ‘old_name’ to ‘new_name’)cp – cp file1 file2
(copy the contents of ‘file1’ to ‘file2’)grep – grep ‘text’ file.txt
(search for the word ‘text’ in the file ‘file.txt’)man – man ls
(display the manual page for the command ‘ls’)chmod – chmod 755 file.txt
(change the access permissions of ‘file.txt’ to 755)touch example.txt
- This will create an empty file called "example.txt".echo "Hello World"
- This will write the text "Hello World" to the display.cat example.txt
- This will display the contents of the file "example.txt" on the screen.
Thank you, I hope this article helps you to get a basic understanding of Linux. Please do follow, share and comment.