Basic Linux Commands: We Need to Know.

New Code
3 min readMar 10, 2023

--

Linux is a free and open-source operating system that is based on the Unix operating system. It was created by Linus Torvalds in 1991 and has since become one of the most widely used operating systems in the world.

Linux is known for its stability, security, and flexibility, and is used in a wide range of applications, including servers, desktop computers, mobile devices, and embedded systems. It is also popular for development purposes, as it provides a powerful and customizable environment for software development.

One of the key features of Linux is its use of the command line interface (CLI), which allows users to interact with the system using text-based commands. This provides a powerful and efficient way to manage and customize the system, although it can be intimidating for users who are not familiar with the CLI.

Linux is distributed under various open-source licenses, which means that the source code is freely available and can be modified and distributed by anyone. This has led to the development of many different distributions, or “distros,” of Linux, each with its own set of features and target audience. Some popular Linux distros include Ubuntu, Debian, Fedora, and Red Hat Enterprise Linux.

  1. ls - lists the files and directories in the current directory.
  2. cd - changes the current directory.
  3. pwd - prints the current working directory.
  4. mkdir - creates a new directory.
  5. rm - removes a file.
  6. rmdir - removes a directory.
  7. cp - copies a file.
  8. mv - moves or renames a file.
  9. cat - displays the contents of a file.
  10. grep - searches for a pattern in a file or set of files.
  11. chmod - changes the permissions of a file or directory.
  12. sudo - executes a command with superuser privileges.
  13. tar - creates or extracts a compressed archive.
  14. top - displays information about the system's processes.
  15. ping - tests the connectivity to a network host.
  16. touch - creates a new file or updates the timestamp of an existing file.
  17. head - displays the first few lines of a file.
  18. tail - displays the last few lines of a file.
  19. less - displays the contents of a file one page at a time.
  20. wget - downloads files from the internet.
  21. curl - transfers data from or to a server.
  22. df - displays information about the disk usage of file systems.
  23. du - displays the disk usage of files and directories.
  24. mount - mounts a file system.
  25. umount - unmounts a file system.
  26. ps - displays information about the running processes.
  27. kill - sends a signal to a process to terminate it.
  28. jobs - displays the status of the running jobs.
  29. bg - runs a job in the background.
  30. fg - brings a job to the foreground.
  31. history - displays the command history.
  32. clear - clears the terminal screen.
  33. alias - creates an alias for a command.
  34. date - displays the system date and time.
  35. echo - displays a message on the screen.
  36. find - searches for files or directories that match a specified criteria.
  37. grep - searches for a specified pattern in a file or files.
  38. sed - stream editor for modifying text.
  39. awk - a powerful text processing tool for extracting and manipulating data.
  40. sort - sorts the contents of a file line by line.
  41. uniq - removes duplicates from a sorted file.
  42. cut - extracts specific columns or fields from a file.
  43. paste - merges lines from multiple files.
  44. diff - compares the contents of two files and shows the differences.
  45. rsync - synchronizes the contents of two directories.
  46. scp - copies files securely between hosts on a network.
  47. ssh - securely connects to a remote host.
  48. tar - creates or extracts compressed archives.
  49. gzip - compresses files using the gzip format.
  50. gunzip - decompresses files compressed with gzip.
  51. df - displays the free disk space on file systems.
  52. du - shows the disk usage of files and directories.
  53. ifconfig - displays network interface configuration.
  54. netstat - shows network connections and statistics.
  55. route - displays and modifies the IP routing table.

--

--