Sunday, August 29, 2010

Linux Amazing Keypresses & Commands : Set 3

1. Unmount busy drives
You are probably all too familiar with the situation - you are trying to unmount a drive, but keep getting told by your system that it's busy. But what application is tying it up? A quick one-liner will tell you:
$lsof +D /mnt/windows
This will return the command and process ID of any tasks currently accessing the /mnt/windows directory. You can then locate them, or use the kill command to finish them off.

2. su command  fast execution without logging in.
$su --c [command]
It enables you to issue a command in administrative mode directly after providing the superuser password. And when the command is executed the user is logged off to the previous user.

Sunday, August 15, 2010

Linux Amazing Keypresses & Commands : Set 2

1. Some handy linux keyboard shortcuts!
[alt][tab] Walk through windows. To walk backwards: [alt][shift][tab]
[ctrl][tab] Walk through desktops. To walks backwards: [ctrl][shift][tab]
[ctrl][esc] Show the table of processes running on my system. Allow me to kill any of the processes I started (or send other signals to them).
[alt][f1] Access the K-menu ("Equivalent to MS Windows "Start" menu).
[alt][f12] Emulate the mouse using the arrow keys on the keyboard.
[alt][leftmousebutton] Drag a window to move it. Normally, I move a window by dragging its top title bar, but occassionally I manage to get it off the screen. With this shortcut, I can drag by any part of the window.