Bash shell commands for daily administration tasks

The fol­low­ing are a bash shell com­mands for daily admin­is­tra­tion tasks.

Shell User

  • $ vs # — shell user priv­i­lege indicator

Check who is in shell

Write mes­sage to user

tty

Force logout user

  • Alter­na­tively, com­mand w to see the user, then ps -u the user to check PID and kill -9 <PID>.

Check all service

Check indi­vid­ual service

Check logs

Check quota

Top mem­ory process

(press Shift + m by sort­ing mem­ory descending)

Net­stat

lsof

Check process

(grep spe­cific daemon)

  • To show all processes run­ning on your sys­tem, at the prompt, type the following:

  • Table descrip­tion

Kill the process

tcp­wrap­per

  • Check which IP is being blocked by tcpwrapper

(remov­ing a blocked IP)

(adding a trusted IP)

Check shell com­mands history

Check man­ual of a program

Locat­ing another com­mand or program

  • Note: updatedb is sys­tem data­base update for locate command.

Mul­ti­ple (in-shell) Terminals

  • Like mul­ti­ple desk­top man­ager, you can have mul­ti­ple terminal/console using screen util­ity tool.

Learn more

Leave a Reply