Essential Linux Commands for Beginners

adduserThe 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".sedThe 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.manThe 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.calThe 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.hostnameThe hostname command is used to display the hostname of the system. To use the hostname command, simply type "
hostname" in the terminal.viThe 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.dateThe date command is used to display the current date and time. To use the date command, simply type "
date" in the terminal.topThe 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.whoThe 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.tfdThe 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.wallThe 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.unameThe 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.lsThe 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.cpuThe cpu command is used to display information about the CPU. To use the cpu command, simply type "
cpu" in the terminal.lsusbThe lsusb command is used to list the USB devices connected to the system. To use the lsusb command, simply type "
lsusb" in the terminal.shutdownThe 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.rebootThe reboot command is used to reboot the system. To use the reboot command, simply type "
reboot" in the terminal.ttyThe 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.whoamiThe 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.ls -aThe ls -a command is used to list all files and directories in the current working directory, including hidden files. To use the
ls -acommand, simply type "ls -a" in the terminal.dmidecodeThe dmidecode command is used to display information about the system's hardware. To use the dmidecode command, simply type "
dmidecode" in the terminal.echo $0The 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.whichThe 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.free -mThe 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.chmodThe 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.findThe 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.grepThe 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 occurrenceswhatiscommand 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.
awkThis 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.tarThis 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.




