Wednesday, September 14, 2011

Some more commands in linux


free

Displays amount of free and used memory in the system.

free -m -->in Mega bytes.

free -t--->Display total summary for physical memory + swap space.

cat /proc/cpuinfo

Displays information about your CPU.

cat /proc/meminfo

Display lots of information about current memory usage.

uname -a

Prints system information to the screen (kernel version, machine type,
etc.)

grep

Search for a pattern in a file or program output. For example, to find out
which TCP network port is used by the “nfs” service, you can do this:

grep "nfs" /etc/services

This looks for any line that contains the string “nfs” in the file “/etc/services”
and displays only those lines.

su

“Switch User”. Allows you to switch to another user's account temporarily.

The default account to switch to is the root/superuser account. Examples:

su - Switch the root account

su - - Switch to root, and log in with root's environment

su larry - Switch to Larry's account

Enjoy:-)

No comments: