Tuesday, March 29, 2011

Ubuntu: Remove old kernel

Removing old kernel is part of system maintenance. Basically to clear up the boot space and tidy up the grub menu. Steps as below:

  • In terminal, type: uname -r. Take note of the kernel version
  • Go to System > Administration > Synaptic Package Manager
  • Search for linux-image
  • Select the older version kernel (which is not equal to first step above) with green box, right-click and select Mark for Removal
  • Click on Apply

Sunday, March 27, 2011

Ubuntu: Update grub manually

Here's how to update grub manually. In Terminal, type command: sudo update-grub


username@desktop:~$ sudo update-grub
[sudo] password for username: 
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-28-generic-pae
Found initrd image: /boot/initrd.img-2.6.35-28-generic-pae
Found linux image: /boot/vmlinuz-2.6.35-24-generic-pae
Found initrd image: /boot/initrd.img-2.6.35-24-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 10.10 (10.10) on /dev/sdb7
done
username@desktop:~$ 

Saturday, March 26, 2011

Ubuntu: Write access to files and folders in Live CD session

Usually we'll access the system via Live CD in scenarios where we cannot boot the system normally. So this is where you do troubleshooting, revise config files etc or to backup important data.


You will not have write access to some of these files and folders. To do so, open up terminal and type in the following command:


sudo nautilus


A new folder will open, and you will see this folder is set as root. You now have write access to all files and folders in the Live CD session.

Ubuntu: Regular cleanup maintenance

After each installation of updates etc. do the following steps for maintenance:


1) Launch terminal by going to Applications > Accessories > Terminal
2) Below are the 2 commands:
  • sudo apt-get autoclean
  • sudo apt-get autoremove

3) Since you're using sudo, enter sudo password. Depending if there are anything to be cleaned/removed, you will need to confirm by pressing y/n.


username@desktop:~$ sudo apt-get autoclean
[sudo] password for username:
Reading package lists... Done
Building dependency tree    
Reading state information... Done
username@desktop:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree    
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-2.6.35-22
0 upgraded, 0 newly installed, 1 to remove and 284 not upgraded.
After this operation, 80.1MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 133710 files and directories currently installed.)
Removing linux-headers-2.6.35-22 ...
username@desktop:~$

So, 80.1 MB of free space is now available! 

Ubuntu: Web browser cache folder

For those who are unfamiliar, cache folders are being used to store files, images etc as you browse websites on the Internet. So, you might be wondering what's so important to know the cache folder for? Well, all I can say is see it for yourself :D.


Here's the cache path in Ubuntu for the 2 web browsers below:


Mozilla Firefox:
/home/yourusername/.mozilla/firefox/xxxxxxxx.default


Google Chromium: 
/home/yourusername/.cache/chromium/Default




Ubuntu: Transmission settings backup in a fresh install

When you do a fresh install of Ubuntu, here's how to "export" Transmission's previous settings and torrent queues to the newly installed system:


1) In old system, go to /home/username/.config/transmission


  • Copy the contents of folders resume and torrent
  • File settings.json will have your settings, just make sure the download folder etc are revised (because your previous system might have different path folder etc.)


screenshot of the transmission's config folders

2) In the new system, go to the same folder above: /home/username/.config/transmission

  • Paste the items copied above according to their folders into here.


3) Run Transmission again, you should see all the queues and progress as per the previous system. Enjoy!

*Tips: ".config" is a hidden folder. You'll need to press Ctrl+H to view it.