Showing posts with label maintenance. Show all posts
Showing posts with label maintenance. Show all posts

Wednesday, June 22, 2011

Ubuntu: Navigating folders and directory commands in Terminal

Initial line in Terminal. Note that ~ represents the Home Folder.
username@machinename:~

To know your current working directory:

username@machinename:~$ pwd
home/rootfolder 


To know the list of items inside the path (or can also use command dir):
username@machinename:~$ ls
Folder1  Folder2  Folder3

To change directory:
username@machinename:~$ cd Folder1 
username@machinename:~/Folder1$
To return back to Home Folder:

username@machinename:~/Folder1$ cd ~ 
username@machinename:~$


To go to root filesystem:
username@machinename:~$ cd /
username@machinename:/$ ls 
bin    dev   initrd.img  media  root     srv  usr
boot   etc   lib         mnt    sbin     sys  var
cdrom  home  lost+found  proc   selinux  tmp  vmlinuz

To go up one level (notice there is a space, unlike in DOS where it is "cd.."):
username@machinename:/media$ cd ..
username@machinename:/$


To go up one level and to a specific folder name in that directory:

username@machinename:/media$ cd ../boot
 username@machinename:/boot$

Friday, April 8, 2011

Ubuntu: The following packages have been kept back

 To force update on packages that have been "kept back":


sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

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

Saturday, March 26, 2011

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!