Linux is a Unix-based operating system an open-source operating system that is known for its stability, security and flexibility this is available in many versions or distributions, such as Ubuntu, Debian, centos etc
Features of Linux are
Multi-user and multi-tasking- supports multiple users and tasks simultaneously
Command-line interface-To interact with the system using a wide range of commands
Open-source community-source code is freely available and can be modified or distributed by anyone
Why Linux is so popular?
in Linux, everything is represented as a file including a hardware program the files are stored in the directory (folder) which contains your files with a tree structure that is called a file system hierarchy
- /(root): This is the super user of your operating system every directory starts with this super directory e.g-
ls, /root
/boot: Contains the files needed to boot the system, including the kernel and bootloader. e.g-
ls /boot
/lib: Contains libraries and modules needed by the system and other programs. e.g-
ls /lib
/opt: Contains optional third-party software packages
/home: Users' home directories, containing saved files, and personal settings, this is for all users to store their file
/dev: this contains the information about devices attached to the system
/media: Mount point for removable media devices like USB drives, CD-ROMs and DVDs
/var: contains variable data files, such as log files
/sbin: contains the information about system administrative files
/usr: it's the directory that contains the majority system s user utilities and applications this includes programs, libraries, source code for applications etc
Basic commands for Linux:
ls
- list all the directoriesPWD
-Print the working directory/
- root directory$
-regular usercd
- to change the directoriesmkdir
- to make a new directorytouch
- make a new filesudo
- command in Linux that allows a user with administrative privileges to execute the commandmv
- move or rename the files in Linuxcp
- same like mv but for copying filesclear
- to clear the terminalecho
- Print the text that follows the commandcat
- display the content of the file on terminalman
- to see the manual pages for all commandsps
- to show all the processes runningps -a
- display all the background processTop
- all the active processes with their system usagekill
- to kill or terminate any processchmod
- used to change the files and directory permissionchown
- used to change the ownership of file or directoryzip
- used to Zip the filesunzip
- used to unzip the fileswget
- used to download or install files from the internethistory
- used to view the previously executed commandrm
- used to remove the files