Skip to main content

Command Palette

Search for a command to run...

Essential Linux Commands for Beginners

Updated
6 min read
Essential Linux Commands for Beginners
  1. adduser

    The adduser command is used to create a new user account on the system. To use the adduser command, simply type "adduser" followed by the username of the new user. For example, "adduser john" will create a new user account with the username "john".

  2. sed

    The sed command is used to perform text transformations on a file or input stream. To use the sed command, simply type "sed" followed by the text transformation you want to perform. For example, "sed 's/old_text/new_text/g' file.txt" will replace all occurrences of "old_text" with "new_text" in the "file.txt" file.

  3. man

    The man command is used to display the manual page for a specific command. To use the man command, simply type "man" followed by the name of the command you want to learn about. For example, "man ls" will display the manual page for the "ls" command.

  4. cal

    The cal command is used to display a calendar for a specific month and year. To use the cal command, simply type "cal" followed by the month and year you want to display. For example, "cal 5 2023" will display the calendar for May 2023.

  5. hostname

    The hostname command is used to display the hostname of the system. To use the hostname command, simply type "hostname" in the terminal.

  6. vi

    The vi command is a text editor used to create and modify files. To use the vi command, simply type "vi" followed by the name of the file you want to edit. For example, "vi file.txt" will open the "file.txt" file in the vi editor.

  7. date

    The date command is used to display the current date and time. To use the date command, simply type "date" in the terminal.

  8. top

    The top command is used to display real-time system information, including CPU usage and memory usage. To use the top command, simply type "top" in the terminal.

  9. who

    The who command is used to display a list of users currently logged in to the system. To use the who command, simply type "who" in the terminal.

  10. tfd

    The tfd command is used to display the number of days until a specific date. To use the tfd command, simply type "tfd" followed by the date you want to count down to. For example, "tfd 2023-12-31" will display the number of days until December 31, 2023.

  11. wall

    The wall command is used to send a message to all users logged in to the system. To use the wall command, simply type "wall" followed by the message you want to send. For example, "wall Hello, everyone!" will send the message "Hello, everyone!" to all users logged in to the system.

  12. uname

    The uname command is used to display system information. To use the uname command, simply type "uname" followed by the option you want to display. For example, "uname -a" will display all system information, while "uname -r" will display the kernel release number.

  13. ls

    The ls command is used to list the files and directories in the current working directory. To use the ls command, simply type "ls" in the terminal. You can add additional options to the ls command to customize the output, such as "-a" to show hidden files.

  14. cpu

    The cpu command is used to display information about the CPU. To use the cpu command, simply type "cpu" in the terminal.

  15. lsusb

    The lsusb command is used to list the USB devices connected to the system. To use the lsusb command, simply type "lsusb" in the terminal.

  16. shutdown

    The shutdown command is used to shut down the system. To use the shutdown command, simply type "shutdown" followed by the options you want to use. For example, "shutdown -h now" will shut down the system immediately.

  17. reboot

    The reboot command is used to reboot the system. To use the reboot command, simply type "reboot" in the terminal.

  18. tty

    The tty command is used to display the name of the terminal you're currently using. To use the tty command, simply type "tty" in the terminal.

  19. whoami

    The whoami command is used to display the username of the currently logged-in user. To use the whoami command, simply type "whoami" in the terminal.

  20. ls -a

    The ls -a command is used to list all files and directories in the current working directory, including hidden files. To use the ls -a command, simply type "ls -a" in the terminal.

  21. dmidecode

    The dmidecode command is used to display information about the system's hardware. To use the dmidecode command, simply type "dmidecode" in the terminal.

  22. echo $0

    The echo $0 command is used to display the name of the current shell. To use the echo $0 command, simply type "echo $0" in the terminal.

  23. which

    The which command is used to display the location of a command. To use the which command, simply type "which" followed by the name of the command you want to locate. For example, "which ls" will display the location of the "ls" command.

  24. free -m

    The free -m command is used to display information about the system's memory usage. To use the free -m command, simply type "free -m" in the terminal.

  25. chmod

    The chmod command is used to change the permissions of a file or directory. To use the chmod command, simply type "chmod" followed by the permissions you want to set and the name of the file or directory. For example, "chmod 755 file.txt" will set the permissions of "file.txt" to read, write, and execute for the owner, and read and execute for everyone else.

  26. find

    The find command is used to search for files and directories in a specific location. To use the find command, simply type "find" followed by the location you want to search and the search criteria. For example, "find /home/user -name '*.txt'" will search for all files with a ".txt" extension in the "/home/user" directory.

  27. grep

    The grep command is used to search for a specific pattern in a file or input stream. To use the grep command, simply type "grep" followed by the pattern you want to search for and the name of the file or input stream. For example, "grep 'hello' file.txt" will search for all occurrences

  28. whatis

    command is a basic command-line tool used in Linux and Unix-like operating systems to display a brief description of a command or function in the system's manual pages (man pages). It is often used to quickly look up the purpose or usage of a command, especially for users who may not be familiar with a particular command or function.

  29. awk

    This command is a powerful text processing tool that can be used to extract and manipulate data from text files or output. It can be used to perform operations on columns of data, filter data based on certain conditions, and much more. For example, you can print the second column of a file using the command awk '{print $2}' /path/to/file.

  30. tar

    This command is used to create and extract tar archives, which are commonly used for bundling multiple files into a single file for easier transfer and storage. For example, you can create a tar archive of a directory using the command tar -czvf archive.tar.gz /path/to/directory.

More from this blog

Omkar kadam's blog

7 posts