Saturday, September 29, 2012

Tenth session of Some of basic UNIX commands that are useful very frequently


Today we will discuss about some more useful commands in UNIX/LINUX based operating systems.

Top is a command used to display and update information like PID, username, cpu, and time etc. about top CPU processes. By default, it displays about top 30 processes and periodically update information about them. Its some what like task manager in WINDOWS based systems where processes tab will dynamically update information about process like how much memory and cpu consumed... Below is sample snapshot of top command in UNIX.




As shown above it displays information and update it periodically of top running processes. If you want to kill any process, then you can simply press 'k' and then corresponding PID of the process. If you want to come back to your terminal, you can simply press 'q' to quit from top command i.e. displaying and updating information about top running processes. You can see the video which explains very clearly usage of this command.

One more important command that we are discussing today is su command which is very useful in executing any commands with respect to another user. It creates a shell(new terminal)with the user id of another user.

su root

Above command will opens a new shell(like new cmd prompt) with 'root' user which is real administrator in UNIX based systems. As UNIX is very secured, for some operations to execute, you need to be real administrator. In such cases this command will be very useful.

This command has many more uses that you can know by using 'man su' as we described in previous posts...

Will discuss about some more useful commands in UNIX/LINUX systems in next posts. Please feel free to post any suggestions/queries.


No comments: