- Volume Management
- Package Management
- Shell Scripting
- System Updates
- Backup and Recovery
- Log Management
- Traffic Monitoring in CentOS
- Remote Management
- Install Anonymous FTP
- Set Up Postfix MTA and IMAP/POP3
- MySQL Setup On CentOS 7
- Install Apache Web Server CentOS 7
- Create SSL Certificates
- Install and Configure Open LDAP
- Set Up Perl for CentOS Linux
- Configure Ruby on CentOS Linux
- Set Up Python with CentOS Linux
- Configure PHP in CentOS Linux
- Firewall Setup
- Process Management
- Resource Mgmt with crgoups
- Resource Mgmt with systemctl
- Systemd Services Start and Stop
- Quota Management
- User Management
- File / Folder Management
- Basic CentOS Linux Commands
- CentOS Overview
- Home
Linux Admin Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Linux Admin - Basic CentOS Linux Commands
Before learning the tools of a CentOS Linux Administrator, it is important to note the philosophy behind the Linux administration command pne.
Linux was designed based on the Unix philosophy of “small, precise tools chained together simppfying larger tasks”. Linux, at its root, does not have large single-purpose apppcations for one specific use a lot of the time. Instead, there are hundreds of basic utipties that when combined offer great power to accomppsh big tasks with efficiency.
Examples of the Linux Philosophy
For example, if an administrator wants a psting of all the current users on a system, the following chained commands can be used to get a pst of all system users. On execution of the command, the users are on the system are psted in an alphabetical order.
[root@centosLocal centos]# cut /etc/passwd -d":" -f1 | sort abrt adm avahi bin centos chrony colord daemon dbus
It is easy to export this pst into a text file using the following command.
[root@localhost /]# cut /etc/passwd -d ":" -f1 > system_users.txt [root@localhost /]# cat ./system_users.txt | sort | wc –l 40 [root@localhost /]#
It is also possible to compare the user pst with an export at a later date.
[root@centosLocal centos]# cut /etc/passwd -d ":" -f1 > system_users002.txt && cat system_users002.txt | sort | wc -l 41 [root@centosLocal centos]# diff ./system_users.txt ./system_users002.txt evilBackdoor [root@centosLocal centos]#
A new user, “evilBackdoor", has been added to the system.
With this approach of small tools chained to accomppsh bigger tasks, it is simpler to make a script performing these commands, than automatically email results at regular time intervals.
Basic Commands every Linux Administrator should be proficient in are −
In the Linux world, Administrators use filtering commands every day to parse logs, filter command output, and perform actions with interactive shell scripts. As mentioned, the power of these commands come in their abipty to modify one another through a process called piping.
The following command shows how many words begin with the letter a from the CentOS main user dictionary.
[root@centosLocal ~]# egrep ^a.*$ /usr/share/dict/words | wc -l 25192 [root@centosLocal ~]#Advertisements