linux daily use command for server maintenance

Summary: This post is for sysadmin to review the linux daily use command for server maintenance . I added a short descriptions of each command to know the purpose of the command which you are going to try and use for daily maintenance.

1: pwd
This command show the control on the current directory. It will display the path where my control currently stand from base.


2. hostname
The above command Print the name of the machine which also know is fully qualified domain name.We can use the command netconf (as root) to change the name of the machine.


3. whoami
Print my login name. This command will print UID, GID, effective id and supplementary groups.


4. date

Print the operating system current date, time and timezone.


To set the hardware (BIOS) clock from the system (Linux) clock, I can use the command (as root): setclock

5. time
Determine the amount of time that it takes for a process to complete + other process accounting. . E.g. I can find out how long it takes to display a directory content using: time ls.


Obtain date/time from the computer hardware (real time, battery-powered) clock.


Determine the users logged on the machine.


The w command print users currently login into the system and their login time. it also print the server load average uptime and users activity session.

9. finger user_name
It is a utility and need to be installed on the server. It show you System info about a user.

10. last
Show listing of users last logged-in on your server .It will show you all the login time-stamp from current month first date to current date. Really good idea to check it from time to time as a security measure on your system.

11. lastb

chmod o-r /var/log/btmp

This command will show you the last unsuccessful login attempts on your server. The server log the unsuccessful attempt in a file /var/log/btmp Which is a security threat if not managed carefully. Sometime in urgency we missedup with username and password and type password instead of username which log into the this file. By default the file is readable to all. So we need to change permission from all to root only. The procedure is mention above.


12.history | more
This command will display all the commands executed on the current login page by page.  The history is kept in the file .bash_history in the user home directory (so yes, it can be modified or erased).

Show the amount of time since the last reboot.
(“print status” or “process status”) List the processes currently run by the current user.


15. ps axu | more
List all the processes currently running, even those without the controlling terminal, together with the name of the user that owns each process.
Keep listing the currently running processes on my computer, sorted by cpu usage (top processes first). Press c when done.


17. uname -a
This command will print the unix name will all options.


18. cat /etc/issue
Check what distribution you are using. You can put your own message in this text file–it’s displayed on login.


free -m, free -g
Memory info (in kilobytes). Using free with -m will show you memory status in MegaBytes and with -g it will show you with Giga Bytes. “Shared” memory is the memory that can be shared between processes.”Buffered” and “cashed” memory is the part that keeps parts of recently accessed files.


20. df -h
(=disk free) Print disk info about all the filesystems (in human-readable form).

Selection_026 /proc/cpuinfo
It shows the content of the file cpuinfo. The files resides in the /proc directory are not real files , they are hooks to look at the information available to the kernel. /proc/interrupts
List the interrupts in use. May need to find out before setting up new hardware. /proc/filesystems
It will Show you the current filesystems used by the server. /etc/printcap |more
Show the setup of printers.

(= “list modules”. As root.) Show the kernel modules currently loaded.If you are non root user then run the command like this /sbin/lsmod

26.echo $PATH
Show the content of the environment variable “PATH”. This command can be used to show other environment variables as well. Use set to see the full environment.


27.chage -l my_login_name
If you want to see your password expiry information you have to run the command above.


This is a utility need to be installed on the server through yum or through apt-get install. It will show you the limits of Disk Usage.

29.sysctl -a |more
Display all the configurable Linux kernel parameters.


Print the previous and current runlevel.

Runlevel is the mode of operation of Linux. Runlevel can be switched “on the fly” using the command init. For example, init 3 (as root) will switch me to runlevel 3. The following runlevels are standard:
0 – halt (Do NOT set initdefault to this)
1 – Single user mode
2 – Multiuser, without NFS (The same as 3, if you do not have networking)
3 – Full multiuser mode
4 – unused

5 – X11
6 – reboot (Do NOT set initdefault to this)
The system default runlevel is set in the file: /etc/inittab .

Hope this will help. For technical Assistance you can ping me through contact page of

Leave a Reply

Your email address will not be published. Required fields are marked *