New to Linux?

Get familiar with some of the basic yet essential commands which you will have to use regularly as a Linux administrator.

Find kernel version

uname -r

Display file size in human readable format (e.g. KB, MB etc.,)?

ls -lh

What is the Linux process priority levels?

19 (lowest) to –20 (highest)

How many characters can have filename?

255

How to Shutdown the system after 10 minutes?

shutdown -h +10

What is the command to rebuild the initrd image ?

mkinitrd

How to gather sar output specific time for memory?

sar -s 02:00:00 -e 03:00:00 -r

What file lists the DNS servers a UNIX host uses?

/etc/resolv.conf

What’s the default filesystem type on Redhat Linux 5?

ext3

What command can you use to review boot messages?

dmesg

Which file to set a kernel parameter on a Linux machine?

/etc/sysctl.conf

What is the configuration file for ports?

/etc/services

How to create a swap file in a data partition?

dd if=/dev/zero of= bs= count=

How to delete files older than 7days?

find /path/to/files* -mtime +7 -exec rm {} ;

Check disk usage in human readable and sort by size?

du -sh * | sort

How to list the password and its related details an user?

chage -l username

How to set account expiry date for a user?

chage -E "2012-06-31" raja

How to disable password aging for a user account?

chage -m 0 -M 99999 -I -1 -E -1 madhu

How to check memory map of a given process id 5264?

pmap 5264

How to verify crontab entry for a specific user

crontab -u username -l

I hope this helps.