For changing directory / to /etc
  • [root@semakness /]# cd /etc
One step back /etc to /
  • [root@semakness etc]# cd ..
Go to previous working directory
  • [root@semakness /]# cd -
Go to current login user home directory
  • [root@semakness etc]# cd ~
Show the contents of /etc in single color
  • [root@semakness ~]#  dir  /etc
Show the contents of /etc in different colors with nature of contents
  • [root@semakness ~]#  Ls  /etc
Create a folder on root partition
  • [root@semakness  ~]#  mkdir  /disk
Create a folder in /disk
  • [root@semakness  ~]#  mkdir  /disk/dir
Create multiple folder in multiple directories with single command
  • [root@semakness  ~]#  mkdir  /etc/dir1 /var/dir2 /usr/dir3
Create multiple folder in same directory
  • [root@semakness  ~]#  mkdir  dir1 dir2 dir3
Copy a file in directory
  • [root@semakness  disk]#  cp  file dir
Copy a file from /disk/file and paste it in /disk/dir/
  • [root@semakness  disk]#  cp  /disk/file /disk/dir
Copy a directory with –r option
  • [root@semakness  disk]#  cp  -r  dir  dir2
Copy a file from /disk/file and paste it in /etc with myfile name
  • [root@semakness  disk]#  cp  /disk/file  /etc/myfile
Remove a file
  • [root@semakness  disk]#  rm file
Remove a file with forcefully option
  • [root@semakness  disk]#  rm –f  file
Remove a directory with out –r option and you face will an error
  • [root@semakness  disk]#  rm dir
Remove a directory with –r option
  • [root@semakness  disk]#  rm  -r  /disk
Remove a directory with forcefully option
  • [root@semakness  disk]#  rm  -rf  dir
Move /etc/dir1 to /disk/ with different name
  • [root@semakness  disk]#  mv  /etc/dir1  /disk/mydir
Rename the folder name mydir to dir
  • [root@semakness  disk]#  mv  /disk/mydir  /disk/dir
Rename the file name with myfile
  • [root@semakness  disk]#  mv file myfile
Read a file page by page with less command
  • [root@semakness  disk]# less  /etc/grub.conf
Read a file page by page with more command
  • [root@semakness  disk]# more  /etc/qrub.conf
Read first ten lines of grub.conf
  • [root@semakness  disk]# head  /etc/grub.conf
Read last ten lings of grub.conf
  • [root@semakness  disk]# tail  /etc/grub.conf
Read first 12 lines with –n option
  • [root@semakness  disk]# head  -n  12  /etc/grub.conf
Read last 11 lines with –n option
  • [root@semakness  disk]# tail  -n 11  /etc/grub.conf
Copy the contents of /etc/grub.conf in /disk/file
  • [root@semakness  disk]# cat  /etc/grub.conf > /disk/file
Append the contents /etc/mtab in /etc/file
  • [root@semakness  disk]# cat  /etc/mtab >>  /disk/file
Merging tow commands with pipe sign output of the first command is input of second command
  • [root@semakness  disk]# cat  /etc/squid/squid.conf I more
Count the total lines of squid.conf
  • [root@semakness  disk]# cat  /etc/squid/squid.conf I wc  -L
Show only spool words in squid.conf
  • [root@semakness  disk]# cat  /etc/squid/squid.conf  I grep  spool
Flush the contents of file
  • [root@semakness  disk]# cat  /dev/null  >  /var/log/messages





Keyboard shortcuts are preset in the system, but you can add new ones or change them easily. For instance, change the default shortcut Ctrl+Alt+T (Run a Terminal) to Win+R (press R while holding down the Windows key, also known as Super key) by the following steps:
Keyboard ShortcutsGo To System > Preferences > Keyboard Shortcuts
  1. Browse to Desktop > "Run a terminal"
  2. Click on the Shortcut, and it shows "New shortcut..."
  3. Press Win+R, and it shows Mod4+R
  4. Click the Close button and try the new shortcut.


  •    To disable a shortcut, press Backspace when it shows "New shortcut..." after the step 3 above.
  •    Shortcuts begin with XF86 refer to special keys available to some multimedia keyboards.
  •    Keyboard shortcuts can also be set by changing keybinding values with Configuration Editor. Press Alt+F2 and enter gconf-editor, then navigate to apps > gnome_settings_daemon > keybindings, or apps > metacity > global_keybindings and window_keybindings.




If your Ubuntu system sets the Minimize, Maximize and Close buttons to the left in a window and you prefer to change them to the right, then follow these simple steps:
  • Move buttons to rightPress Alt+F2 to bring up "Run Application" window.
  • Type gconf-editor into the box, click "Run" to bring up Configuration Editor.
  • Browse to apps > metacity > general, look for "button_layout" on the right panel.
  • Change the value in the "button_layout" from close,minimize,maximize: to menu:minimize,maximize,close and press the Enter key.

When you set the panel to be transparent in the default Ambiance theme in Ubuntu, you will find that some panel items' backgrounds are not transparent, but you can make them transparent and consistent with others, following these steps:
  • Ubuntu DesktopGo to Applications (or Main Menu) > Accessories > Terminal.
    • Enter cp -R /usr/share/themes/Ambiance ~/.themes/
      • Enter gedit ~/.themes/Ambiance/gtk-2.0/apps/gnome-panel.rc (for Ubuntu 11.04 or 10.10) OR gedit ~/.themes/Ambiance/gtk-2.0/gtkrc (for Ubuntu 10.04), to open the file with gedit.
        • Search for this line bg_pixmap[NORMAL] = "img/panel.png" (for Ubuntu 11.04 or 10.10) OR bg_pixmap[NORMAL] = "panel_bg.png" (for Ubuntu 10.04)
          • Ubuntu DesktopComment out the line by placing a # at the beginning of the line, like this: #   bg_pixmap[NORMAL] = ...
            • Save the file.
              • Go to System > Preferences > Appearance, switch to the other theme and then back to the Ambiance theme.
                   If you'd to change to the New Wave theme, then enter cp -R /usr/share/themes/"New Wave" ~/.themes/ in step 2, enter gedit ~/.themes/"New Wave"/gtk-2.0/gtkrc in step 3, search for and comment out this line bg_pixmap[NORMAL] = "Images/Panel/PanelBarLong.png" in steps 4 and 5 respectively.


                Ubuntu includes a top panel and a bottom panel by default. If you prefer to keep only one panel at the bottom just like the Windows Taskbar, then these are the steps to follow:
                1. Ubuntu DesktopDelete the bottom panel: right-click over it and click "Delete This Panel".
                2. Move the top panel to bottom: right-click over it, select "Properties" and change Orientation from "Top" to "Bottom".
                3. Add running program buttons: right-click the panel, select "Add to Panel", scroll down and select "Window List", click "Add".
                4. Replace the Menu Bar ("Applications-Places-System") with the "Main Menu" to save space in the panel:
                  1. Right-click the "Menu Bar" and select "Remove From Panel".
                  2. Right-click the panel, select "Add to Panel" and choose "Main Menu", click "Add".
                  3. Right-click the items (Firefox, etc) and untick "Lock to Panel".
                  4. Right-click the added "Main Menu", select "Move" to relocate it to the far left.
                These are basic changes. The panels are much more flexible than the Windows Taskbar in that many items in the panels can be easily added, removed or configured.
                   The Main Menu shows the "Lock Screen", "Log Out" and "Shut Down" items if you remove the "Indicator Applet Session" item (which shows your username and the shutdown button to the right of the panel). These three items are hidden from the Main Menu when the Indicator Applet Session item is on the panel.
                   If you need to restore the panels to the original state, enter the following commands into the Terminal and re-start the system:
                1. sudo gconftool-2 --shutdown
                2. sudo rm -rf .gconf/apps/panel
                3. sudo pkill gnome-panel
                   At any point if your customized desktop settings caused a problem and you wish to reset all back to their defaults, then enter this command sudo rm -rf .gnome .gnome2 .gconf .gconfd .metacity in the Terminal, log out and log back in to the system.
                SPONSORED BY