50 useful Linux commands
If you are a Linux user, using Linux commands greatly enhances your productivity and efficiency, allowing you to navigate through directories, manage files and processes, troubleshoot issues, automate tasks, and perform a wide range of operations from the command line.
Basic CommandsPermalink
ls: List directory contentscd: Change directorypwd: Print working directorymkdir: Make directoryrm: Remove files or directoriescat: Concatenate and display filesecho: Display messages or values of variableshistory: Display previously executed commandsfind: Search for files in a directory hierarchytar: Create or extract archive files
System InformationPermalink
top: Display and update sorted information about processesfree: Display amount of free and used memory in the systemdf: Display disk usage statistics for filesystemswhoami: Print the current logged in user’s nameuname: Display system informationdmesg: Print the kernel ring bufferlshw: Display detailed hardware information
File OperationsPermalink
nano: A basic text editor for creating and modifying filescp: Copy files and directories from one location to anothermv: Move or rename files and directoriestouch: Create an empty file or modify the timestamp of an existing fileln: Create a symbolic (soft) or hard link to a file
Network CommandsPermalink
ping: Test connectivity between two networked devicestraceroute: Display the path taken by internet packetsssh: Securely connect to a remote computer via SSHnetstat: Display network connections, routing tables, and interface statisticstcpdump: Capture and analyze network traffic
User and PermissionsPermalink
chmod: Change permissions of a file or directorychown: Change the ownership of a file or directoryuseradd: Add a new user account to the systemusermod: Modify a user accountgroupadd: Create a new user grouppasswd: Change the password of a user account
Package ManagementPermalink
apt: Advanced Package Tool for installing, updating, and removing software packagesdpkg: Lower-level package manager for directly installing .deb packagesyum: Yellowdog Updater Modified for managing RPM packagesrpm: Red Hat Package Manager for installing, querying, and verifying RPM packages
Process and System ControlPermalink
ps: Display information about running processeskill: Terminate or send signals to processesservice: Manage system servicessystemctl: Control the system and service managershutdown: Shutdown or reboot the systemhalt: Stop the system
Compression and ArchivingPermalink
gzip: Compress or decompress filesgunzip: Uncompress .gz fileszip: Create or extract .zip filesunzip: Extract content from .zip filesrar: Create or extract RAR archive filesunrar: Extract content from RAR archive files7z: Create or extract files from 7z archive files
I hope this comprehensive list helps you in your Linux journey!
Leave a comment