Some useful commands for a Linux Administration | DevOps tutorials
List of common Linux commands for system administration tasks.
Table of contents
No headings in the article.
However, keep in mind that the exact commands you need will depend on your specific requirements and the Linux distribution you are using. Here are some commonly used commands:
- Managing users and groups:
adduser
: adds a new user to the systemusermod
: modifies user properties such as password, home directory, and group membershipdeluser
: deletes a user account from the systemgroupadd
: adds a new group to the systemgroupmod
: modifies group properties such as group name or group IDdelgroup
: deletes a group from the system
- Managing file system:
ls
: lists the contents of a directorycd
: changes the current working directorypwd
: prints the current working directorymkdir
: creates a new directoryrm
: removes a file or directorycp
: copies files or directoriesmv
: moves files or directorieschown
: changes ownership of a file or directorychmod
: changes file permissionsdf
: displays disk space usagedu
: displays disk usage of a file or directory
- Managing network:
ping
: tests network connectivity to a remote hostifconfig
: displays network interface informationip
: a more modern tool to configure and manage networkingnetstat
: displays network connections and statisticstraceroute
: traces the network path to a remote hostnslookup
: resolves domain names to IP addressessystemctl
: a tool to start, stop, enable and disable system services
- Managing system and hardware:
top
: displays system resource usage (CPU, memory, etc.) in real-timeps
: lists active processes and their statuskill
: terminates a running processreboot
: restarts the systemshutdown
: shuts down the systemfree
: displays available memorylspci
: lists all PCI devices attached to the systemlsusb
: lists all USB devices attached to the systemhwinfo
: a tool to query detailed hardware information
Again*, this is just a small selection of commonly used Linux commands for system administration. You may need to use additional commands depending on your specific use case.*