- How to:
- Navigate to System->Preferences->Keyboard Shortcuts.
- The existing keyboard shortcuts can be found here. They can be changed.
- Click the add button to add your own.
- My favourites: I have customized the shortcuts to act just like in Windows:
- Hide all windows and set focus to Desktop: (Windows + d)
- To open the file explorer: Although there is a default combination to open the home folder, you can add a new command to open any folder:
nautilus --browser folder_path
Eg: nautilus --browser /home/myname/d-drive
Note: nautilus is the default file browser in Ubuntu
Wednesday, 5 October 2011
Add/change keyboard shortcuts (Ubuntu)
Monday, 3 October 2011
Mount a partition during startup
JUMP TO THE EXAMPLE if you are not interested in the details.
EXAMPLE:
To mount /dev/sda6 on a directory "d-drive" under "/home/myname/":
- Enter superuser mode:
- Open a Terminal window.
- Type "sudo su" - This will give you administrative privileges for all commands entered here after.
- Determine which partition you want to mount:
- Type "fdisk -l" - This will show the available partitions.
- Make a note of the partition name (Something like /dev/sdxx)
Eg: /dev/sda
- Create a mount directory and test if you can mount the partition:
- Type "mkdir dir-name" to create a new directory.]
- Type the command:
mount -t fs-type device-name dir-name
Where,
fs-type: File system type (ext2, ext3, ext4, ntfs, vfat, etc.)
device-name: Device name (/dev/sdxx), displayed by "fdisk -l"
dir-name: The new directory created above - Check if the partition is mounted using the "df" command. If it is mounted you will see the partition and the directory name in the list.
Eg: mkdir /home/myname/d-drive
mount -t ntfs /dev/sda6 /home/myname/d-drive
df
mount -t ntfs /dev/sda6 /home/myname/d-drive
df
- Unmount the partiton:
- Type the command:
umount dir-name
Where,
dir-name: Mount directory
Eg: umount /home/myname/d-drive
- Modify "/etc/fstab"
- Type "gedit /etc/fstab &" to open /etc/fstab in an editor (On Xubuntu: "mousepad /etc/fstab &"). The "&" runs this as a new process in the background.
- Add an entry in this format:
device-name dir-name fs-type rw 0 0
Where,
device-name: Device name (/dev/sdxx), displayed by "fdisk -l"
dir-name: Mount directory
fs-type: File system type (ext2, ext3, ext4, ntfs, etc.) - Save the file, but don't close it.
- Go back to the terminal and type "mount -a". This will mount the partition.
- Check if the partition is mounted using the "df" command. If it is mounted you will see the partition and the directory name in the list. If you don't see it, then something is wrong, undo the changes in the file and try again)
- Close the file
Add
/dev/sda6 /home/myname/d-drive ntfs rw 0 0
Save the file
Go back to the terminal and type:
mount -a
df
Save the file
Go back to the terminal and type:
mount -a
df
- Grant read/write access to all users:
- Type the command:
chmod 777 dir-name
Where,
dir-name: Mount directory
- Exit from superuser mode:
- Enter "exit" or press <CTRL>D.
- Close the terminal window.
- Reboot
EXAMPLE:
To mount /dev/sda6 on a directory "d-drive" under "/home/myname/":
- Open a Terminal window.
- sudo su - Enter supervisor mode.
- fdisk -l - Make sure the partition /dev/sda6 exists
- mkdir /home/myname/d-drive - Create the mount directory
- mount -t <fstype> /dev/sda6 /home/myname/d-drive - Mount the partition (the -t <fstype> is optional and depends on the file system type)
Eg:
To mount ext4: mount -t ext4 /dev/sda6 /home/myname/d-drive
To mount ntfs: mount -t ntfs /dev/sda6 /home/myname/d-drive - df - Check if the partition is successfully mounted
- umount /home/myname/d-drive - Unmount the partition
- df - Check if the partition is successfully unmounted
- gedit /etc/fstab & - Edit /etc/fstab (On Xubuntu: mousepad /etc/fstab &)
- /dev/sda6 /home/myname/d-drive <fstype> rw 0 0 - Add this entry (<fstype> is the file system type)
Eg:
In case of ext4: /dev/sda6 /home/myname/d-drive ext4 rw 0 0
In case of ntfs: /dev/sda6 /home/myname/d-drive ntfs rw 0 0
- mount -a - Mount all partitions listed in /etc/fstab
- df - Check if the partition is successfully mounted
- Close /etc/fstab
- chmod 777 /home/myname/d-drive - Give read/write/execute permissions for all users
- exit or <CTRL>D - Get out of supervisor mode
- Close the terminal
- Reboot/ restart
The partition will be mounted on the directory /home/myname/d-drive. You can access the partition by using this path.
Thursday, 8 September 2011
The best part - Live CD
The best part about Ubuntu is that you can use a live CD to check it out.
- What's a live CD?: Well, it lets you run the OS without actually installing it. All data is stored on RAM and so any changes made in the OS will be temporary. The OS will run slower than when installed due to CD speed constraints.
- How to create a Ubuntu live CD: Download the Ubuntu OS ISO image and burn it using any CD writer software.
- Running from the Live CD: Make sure you have set "Boot from CD" under BIOS and off you go.
- Pros:
- Lets you determine if the OS is really meant for you without actually installing it.
- Comes in handy when you have a system crash - You can recover all files.
- You can determine if the OS runs smoothly on your PC.
- Don't like the OS? No hassle uninstalling it. Just shutdown and remove the CD.
- Cons:
- The actual execution speed of the OS can't be determined.
- Once the image is burnt, the CD can't be used for other purposes unless it a RW CD
- Alternatives to burning a CD:
- Install a virtual machine, mount the ISO image and run the OS.
- Create a Bootable USB drive and run the OS.