Tomorrow will be a great day as me along with my two friends are conducting a week-long workshop on Linux for our juniors at our college. Yesterday we spent a lot of time in configuring the labs for training.That’s the reason I couldn’t write here for a few days.But here we go and this time I have brought a bunch of cool Linux tricks.

Show reboot history– issue last reboot command.

List USB details– issue lsusb command.

See you distribution name and version-issue head -n1 /etc/issue command.

Show processing of a command– Install strace package with yum install strace command. Now issue strace -c /bin/ls command to show the processing of ls command.

Force unmount when a drive is busyfuser -km /mnt/hda1 where /mnt/hda1 is the mount point for that drive.

Interactive file manager from command line– Install midnight commander by issuing yum install mc command.Now you can start by issuing mc command from the command line.

Run scripts before and after going to sleep mode-Place your scripts in /etc/pm/power.d to execute scripts after coming out of sleep mode and in /etc/pm/sleep.d to be executed before entering sleep mode.

Enjoy!h

Advertisements