About Me

header ads

Top 50 Linux Basic Commands

 Top 50 Linux Basic Commands You Must Know as a Regular User




copy

1. ls - (view-contents of directory)
2. pwd - (current directory)
3. whoami- ( print current user)
4. cd - (change dir)
5. mkdir - ( make a dir/folder)
6. touch - (create a blank file)
7. echo - ( print )
8. cat - ( view the contant of file on terminal)
9. clear- (clear terminal window)
10. ls -a - ( view all hidden file/dir)
11. ls -la - (view hidden file)
12. ls -ld - (View hidden dir)
13. rm - (remove files)
14. rmdir - ( delete dir)
15. nano - ( GUI editor)
16. gedit - ( GUI editor)
17. cp - (copy files)
18. mv - (move files / rename files)
19. sudo - (Superuser Privileges)
20. grep - ( used to searching words in specific files)
21. cal - ( shows calendar)
22. apt - (interaction with packaging system)
23. uptime - (print current time when machine starts)
24. free - ( print free disk space info)
25. ping - (to check connectivity status to a server)
26. locate - ( used to locate a file)
27. ifconfig - (print ip address wlan)
28. iwconfig - (print ip address eth0)
29. useradd - (add new user)
30. passwd - (change password of user)
31. man - (show manual of linux commands)
32. uname - (print detalied information about your Linux system)
33. find - (searches for files and directories)
34. chmod - (to change permissions of files and directories)
35. history - ( view used commands history)
36. exit - (exit on terminal)
37. top - (task manager in terminal)
38. df - (info about system disk)
39. du - (chek how much space a file or directory takes)
40. uname - (print detailed information about your linux system)
41. useradd - ( add a user )
42. userdel - (delete a user)
43. head - ( view first lines of any text file)
44. tail - (view last lines of any text file)
45. jobs - ( display all current jobs along with their statuses)
46. ssh - (Use to Remotely take a machine)
47. zip - (to compress your files into a zip archive)
48. unzip - ( to extract the zipped files from a zip archive)
49. hostname - ( Know you hostname)
50. sudo -l (view the user has sudo permission) 51. usermod -l <new name> <old name> - ( Change Username )

Created By Sam (Hack Security).......


Introduction:

In the world of Linux, knowing the basic commands is essential for every user. Whether you are a beginner or an experienced user, understanding these commands will greatly enhance your efficiency and productivity. In this blog post, we will provide a comprehensive list of the top 50 Linux basic commands that you should know. Let's dive in!


1. ls - View Contents of Directory:

To see the contents of a directory, use the ls command.It provides detailed information about the files and directories that are present in the designated directory.


2. pwd - Print Current Directory:

The pwd command displays the current working directory. It is useful when you are navigating through different directories and need to know your current location.


3. whoami - Print Current User:

The whoami command prints the current user's username. It is helpful when you want to verify your user identity.


4. cd - Change Directory:

The cd command allows you to change directories. By specifying the path, you can navigate to a specific directory.


5. mkdir - Make a Directory:

The mkdir command creates a new directory. Simply provide the desired directory name after the command, and it will be created.


6. touch - Create a Blank File:

The touch command creates a new file. It can be a useful way to quickly create empty files.


7. echo - Command to Print:

The echo command is utilized to exhibit text or variables on the terminal. It is advantageous for presenting messages or accomplishing fundamental text manipulations.


8. cat - View the Content of a File on Terminal:

The content of a file is shown on the terminal with the cat command. It is commonly used to read text files or combine multiple files.


9. clear - Clear Terminal Window:

The clear command clears the terminal window, making it easier to read subsequent output.


10. ls -a - View All Hidden Files/Directories:

The ls -a command shows all files and directories, including hidden ones. Hidden files are named with a dot (.) at the beginning.


11. ls -la - View Hidden Files:

The ls -la command lists all files and directories, including hidden ones, providing detailed information about each file.


12. ls -ld - View Hidden Directories:

The ls -ld command displays information about hidden directories only, excluding files. It is useful for quickly accessing hidden directories.


13. rm - Remove Files:

The rm command is hired to permanently erase files. Exercise warning even as the usage of this command, as deleted documents can not be restored.


14. rmdir - Delete Directory:

The rmdir command removes an empty directory. It will only work if the directory is empty; otherwise, you need to use the 'rm -r' command.


15. nano - GUI Editor:

The nano command opens the Nano text editor. It is a user-friendly editor for creating and editing text files.


16. gedit - GUI Editor:

The gedit command launches the Gedit text editor, which provides a graphical interface for editing files.


17. cp - Copy Files:

The cp command is used to duplicate files from one location to another. It is helpful when you want to replicate files or create backups.


18. mv - Move Files/Rename Files:

The mv command is a versatile tool for file management tasks. It can be used to move files from one location to another or rename files.


19. sudo - Perform Commands With Superuser Privileges:

The sudo command allows regular users to perform administrative tasks with superuser privileges. It is important to use this command responsibly.


20. grep - Search for Words in Specific Files:

The grep command searches for specific words or patterns in files or directories. It is a powerful tool for text manipulation and searching.


21. cal - Show Calendar:

The cal command displays a monthly calendar on the terminal. It is a handy tool for checking dates and planning.


22. apt - Command to Interact With Packaging System:

The APT command communicates with the Advanced Package Tool (APT) for package administration. It is employed to install, update, and govern software packages.


23. uptime - Print Current Time When Machine Starts:

The uptime command displays how long the machine has been going for walks because the closing boot. It presents information approximately the system's uptime


24. free - Print Free Disk Space Info:

The free command displays information about free and used memory in the system. It helps monitor resource usage and manage memory efficiently.


25. ping - Check Connectivity Status to a Server:

The ping command tests the connectivity between your computer and a server by sending ICMP echo request packets. It helps diagnose network connectivity issues.


26. locate - Locate a File:

The locate command quickly finds files based on their names. It relies on a pre-built database, so it provides fast search results.


27. ifconfig - Print IP Address (WLAN):

The ifconfig command displays network interface configuration details, including IP addresses. It shows information for Ethernet (eth0) and wireless (wlan0) connections.


28. iwconfig - Print IP Address (Ethernet):

The iwconfig command provides information about wireless network interfaces. It displays the configuration details, including the IP address for wireless adapters.


29. useradd - Add New User:

The useradd command creates a new user account. It requires administrative privileges and is used to manage user accounts on Linux systems.


30. passwd - Change Password of User:

The passwd command is used to change passwords for users. It first asks for the current password and then prompts the user to enter a new password.


31. man - Show Manual of Linux Commands:

The man command displays the manual pages for various Linux commands. It provides extensive information about command usage and options.


32. uname - Print Detailed Information About Your Linux System:

The uname command provides detailed information about the Linux system, including the kernel version, hardware platform, and operating system details.


33. find - Search for Files and Directories:

The find utility allows you to explore files and directories by applying specific conditions. It is highly effective for managing files and conducting searches.


34. chmod - Change Permissions of Files and Directories:

The chmod command allows users to change the permissions of files and directories. It is used to control access rights to files and directories.


35. history - View Used Commands History:

The history command displays the command history for the current user. It shows a rundown of recently executed orders.


36. exit - Exit Terminal:

The exit command terminates the current terminal session. It is used when you want to close the terminal window.


37. top - Task Manager in Terminal:

The top command offers a real-time view of system processes. It displays a list of processes that are consuming system resources.


38. df - Info About System Disk:

The df command shows information about the disk space usage on the system. It displays a summary of disk usage per filesystem.


39. du - Check How Much Space a File or Directory Takes:

The du command provides an estimate of the disk usage of files and directories. It shows the total size occupied by each file or directory.


40. uname - Print Detailed Information About Your Linux System:

The uname command provides detailed information about the Linux system, including the kernel version, hardware platform, and operating system details.


41. useradd - Add a User:

The useradd command creates a new user account. It requires administrative privileges and is used to manage user accounts on Linux systems.


42. userdel - Delete a User:

The userdel command is used to delete a person account from the machine. It is commonly used to remove user accounts that are no longer needed.


43. head - View First Lines of Any Text File:

The head command allows you to browse the initial lines of a text file. This feature is commonly utilized to swiftly review the contents of a file.


44. tail - View Last Lines of Any Text File:

The tail command enables you to observe the final lines of a text file. It proves advantageous for monitoring log files or tracking real-time modifications.


45. jobs - Display All Current Jobs Along With Their Statuses:

The jobs command lists all current jobs running on the system. It displays information such as job ID and status.


46. ssh - Use to Remotely Take a Machine:

The ssh command allows users to remotely connect to another machine over a secure network. It provides secure shell access to remote systems.


47. zip - Compress Your Files Into a Zip Archive:

The zip command compresses files into a zip archive. It is an efficient way to reduce file size and create backups.


48. unzip - Extract Zipped Files From a Zip Archive:

Files from a zip archive are extracted using the unzip command. It is used to decompress and retrieve files from zipped archives.


49. hostname - Know Your Hostname:

The hostname command displays the hostname of the current system. It is helpful when you need to identify the machine you are working on.


50. sudo -l - View User's Sudo Permissions:

The sudo -l command shows the user's sudo permissions. It provides information about the commands and actions the user is allowed to perform with superuser privileges.


51. usermod -l <new name> <old name> - Change Username:

The usermod command is used to change a user's username. It requires administrative privileges and is helpful when you want to update a user's login name.


Conclusion:

Knowing the basic Linux commands is essential for every user. In this blog post, we have provided a comprehensive list of the top 50 Linux basic commands that you should know. By understanding and mastering these commands, you can navigate the Linux system effectively, manage files and directories, and perform common administrative tasks. So start exploring these commands and become a proficient Linux user. Happy command line adventures!


Post a Comment

0 Comments