Practical 08
Title : Linux Commands for System Administrators
_________________________________________________________________________________
Linux System Administrator involves the installation, configuration, maintenance and management of Linux-based systems.
1. Uptime Command
The Linux uptime command shows how long your system is running and the number of users who are currently logged in and also displays the load average of a system for 1, 5, and 15 minutes intervals.
Check Uptime Version
Uptime command don’t have other options other than uptime and version. It gives information only in hours:mins:sec if it is less than 1 day.
2. W Command
The w command will display users currently logged in and their process along with showing load averages, login name, tty name, remote host, login time, idle time, JCPU, PCPU, command, and processes.
Available Options
-h : displays no header entries.
-s : without JCPU and PCPU.
-f : Removes from the field.
-V : (upper letter) – Shows versions.
3. Users Command
Users command displays currently logged-in users. This command doesn’t have other parameters other than help and version.
4. Who Command
Who command returns the user name, date, time, and host information. who command is similar to w command. Unlike the w command who doesn’t print what users are doing. Let’s illustrate and see the difference between who and w commands.
Who command Options
-b: Displays last system reboot date and time.
-r: Shows current runlet.
-a, –all: Displays all information cumulatively.
5. ls Command
Ls command displays a list of files in a human-readable format.
6. Crontab Command
List scheduled jobs for current users with crontab command and -l option.
Edit your crontab with -e the option. The below example will open scheduled jobs in VI editor. Make necessary changes and quit pressing :wq keys that save the setting automatically.
7. Less Command
less command allows quickly viewing the file. You can page up and down. Press ‘q‘ to quit from less window.
8. More Command
more command allows quickly view file and shows details in percentage. You can page up and down. Press ‘q‘ to quit out from more window.
9. SSH Command (Secure Shell)
SSH command is used to login into the remote host. For example, the below ssh command will connect to the remote host (192.168.50.2) using the user as Narad.
10. ps command
The ps command displays processes running in the system. The below example show the init to process only.
11. Systemctl Command
Systemctl command is a systemd management tool that is used to manage services, check running statuses, start and enable services and work with the configuration files.
No comments:
Post a Comment