What is Linux?

What is Linux?

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

  1. Multi-user and multi-tasking- supports multiple users and tasks simultaneously

  2. Command-line interface-To interact with the system using a wide range of commands

  3. Open-source community-source code is freely available and can be modified or distributed by anyone

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

Linux File system Hierarchy

  1. /(root): This is the super user of your operating system every directory starts with this super directory e.g-ls, /root
  1. /boot: Contains the files needed to boot the system, including the kernel and bootloader. e.g- ls /boot

  2. /lib: Contains libraries and modules needed by the system and other programs. e.g- ls /lib

  3. /opt: Contains optional third-party software packages

  4. /home: Users' home directories, containing saved files, and personal settings, this is for all users to store their file

  5. /dev: this contains the information about devices attached to the system

  6. /media: Mount point for removable media devices like USB drives, CD-ROMs and DVDs

  7. /var: contains variable data files, such as log files

  8. /sbin: contains the information about system administrative files

  9. /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:

  1. ls - list all the directories

  2. PWD -Print the working directory

  3. / - root directory

  4. $ -regular user

  5. cd- to change the directories

  6. mkdir - to make a new directory

  7. touch - make a new file

  8. sudo - command in Linux that allows a user with administrative privileges to execute the command

  9. mv - move or rename the files in Linux

  10. cp - same like mv but for copying files

  11. clear - to clear the terminal

  12. echo - Print the text that follows the command

  13. cat - display the content of the file on terminal

  14. man - to see the manual pages for all commands

  15. ps - to show all the processes running

  16. ps -a - display all the background process

  17. Top - all the active processes with their system usage

  18. kill - to kill or terminate any process

  19. chmod - used to change the files and directory permission

  20. chown - used to change the ownership of file or directory

  21. zip - used to Zip the files

  22. unzip - used to unzip the files

  23. wget - used to download or install files from the internet

  24. history - used to view the previously executed command

  25. rm - used to remove the files