What is Linux?

What is Linux?

In this article, Linux Operating System is explained and more importantly the function and purpose of commands used in Linux operating system are also explained.

Operating System

Operating system is the system software which is the master control program that manages all the system resources and provides an interface between User and Computer Hardware.It performs all the basics tasks like booting,file management,memory management etc.Most common operating systems are Windows,Linux,Android and Mac OS.So, we are focusing on Linux Operating System.

Linux

Linux is an operating system which is an open source which means that Linux is continuously developed collaboratively.Unlike Windows and MAC which are both tied to the respective companies (Microsoft and Apple).Not one company own’s Linux development and support.Companies and Developers worked together for every kernel release.It has the largest market share when it comes to server OS.Linux is composed of a kernel.The core control software, and plenty of libraries and utilities that provide different features.Linux has many distributions (Linux flavours).The most popular ones include Debian,SUSE, Ubuntu,Linux Mint and Red Hat.

Ubuntu

Fig 1 : Ubuntu (Desktop Screen)

Commands

The commands make the work easy and faster by just typing on the terminal.So here are some commands to learn.

Fig 2: Linux Ubuntu Terminal

  1. ls →displays all the data at a particular library.

  2. cd / move to root directory.

  3. df→shows the memory used or available by mounted files.

  4. df -h → human readable form to read the memory used by files.

  5. du → shows the specific directory file size.

  6. du -s → total size of specific directory.

  7. du -s -h → human readable of total size of a directory.

  8. uname -a → system information of Linux.

  9. uname -p → processor information of Linux.

  10. lscpu → all info of system.

  11. free → check free memory.

  12. free -h → human readable form.

  13. bg → background process display.

  14. man ls → shows all information of ls.

  15. reboot → Restart system.

  16. shutdown → Shutdown system.

  17. nice → shows low priority program.

  18. ps → displays running process.

  19. whatis ls → displays short description of ls.

  20. info ls → shows info of ls command.

  21. touch → used to create files ( like touch test.txt now the test file will be created).

  22. rm filename to remove the file ( like rm test.txt now the test file will be removed).

  23. type → shows the location of a file.

  24. w → who is online.

  25. cal → calendar.

  26. kill → kill the process.

  27. top → displays how many memory is used by the system and how much memory is free.

  28. date →shows date.

  29. sudo → gain root privilege for the normal user.

  30. cp filename another destination→ copy file from one directory to another.

  31. mv filename another destination**→**move file from one directory to another.

  32. sudo apt-cache search python display all packages related to python.

  33. alias myfile = “touch myfile.txt” → a custom command to create a file.

  34. unalias myfile → remove the custom command.

  35. sudo useradd name -m → create a new user in the system.

  36. sudo password name change the user password.

  37. sudo userdel name -r → delete the user.

  38. cat filename used to create a file or multiple files.

  39. sudo apt-get install <package-name> → used to install the package.

  40. sudo apt remove <package-name> used to remove the package.

  41. exit → used to logout from the terminal.

  42. !! → repeats the last command.