Showing posts with label Terminal. Show all posts
Showing posts with label Terminal. Show all posts

Thursday, September 6, 2012

How to update Ubuntu using the Terminal or Update Manager [Ubuntu 12.04 Precise Pangolin]

Updated: 28 Syawal 1433H / 15th Sep 2012M, Sa.

19 Syawal 1433H, Kh.

Assalamualaikum warahmatullah.

I've just upgraded from Ubuntu 11.10 Oneiric Ocelot to Ubuntu 12.04 Precise Pangolin.

For some reasons the system has given me internal errors since the last two start-ups.

My cousin suggested the reason to be the dual-boot thus not everything was upgraded. To try iron out the problems, she suggested updating the system manually using the Terminal. Then remove unneeded packages using the Terminal as well.

The command line has changed since Ubuntu 9.10 Karmic Koala. The old post:
How to update Ubuntu using the Terminal or Update Manager [Ubuntu 9.10 Karmic Koala]
(http://ubuntudigest.blogspot.com/2010/03/how-to-update-ubuntu-using-terminal-or.html)

I stopped using the Terminal after i had some problems with the update or something and have been updating using the Update Manager since. The problem happened some releases back. That's why i haven't update that post although aware of the change in command line. But there's no reason not to make a new post now.


Part A: Update using the Terminal

Pic 1 - The Terminal window.


1. Run the Terminal window.

i'm used to the Launcher being auto-hidden in Ubuntu 11.10 so i had the Launcher hidden for Ubuntu 12.04 as well.

In 12.04 - the launcher is not hidden by default.

Source: configuration - How do I configure Unity 2D? - Ask Ubuntu > 11.10 & above
(http://askubuntu.com/questions/32667/how-do-i-configure-unity-2d)

1.1. Go all the way to the left of the screen to call-out the Launcher. Skip this step if your Launcher is not auto-hidden.


1.2. In the Launcher, click the Dash Home icon, see Pic 2 and Pic 3.

Pic 2 - Refer to Step 1.2. The Dash Home icon in Launcher.


Pic 3 - Refer to Step 1.2. Accessing the Terminal.


1.3. In the Search field, type-in "terminal", see Pic 3.

The search results will auto-filter.


1.4. In the filtered results, click the Terminal icon, see Pic 4.

The Terminal window will appear, see Pic 1.

Pic 4 - Refer to Step 1.4. The Terminal icon.


2. To get the list of packages, type into the Terminal the command line, see Pic 5:
sudo apt-get update
then press the Enter button.

Pic 5 - Refer to Step 2. Getting the updates.


3. The password prompt for user, see Pic 6:
[sudo] password for aisha:
will appear immediately below the command line in Step 2.

Type-in your password then press the Enter button.

The password itself (i.e., ABC123) or characters representing the password (i.e., ******) will not appear as you type-in your password. Even the cursor doesn't move as the password is typed-in, instead it remains blinking in the same spot.

The fetching is done when the line, see Pic 7:
Reading package lists... Done
appears.
Pic 6 - Refer to Step 3. The requested password.


Pic 7 - Refer to Step 3. Done fetching lists of packages.


4. To see the list of updates required for your system, type into the Terminal the command line, see Pic 8:
sudo apt-get install
then press the Enter button.


..., see Pic 9:


To install the updates, type into the Terminal, see Pic 10:
y
then press the Enter button.

Pic 8 - Refer to Step 4.

Pic 9 - Refer to Step 4. *No updates at the moment to make screenshot.*

Pic 10 - Refer to Step 4. *No updates at the moment to make screenshot.*



Note 1: Autoremove

Sometimes you get the, see Pic 11:
The following packages were automatically installed and are no longer required:
response.

Pic 11 - The no longer required packages.


5. To automatically remove obsolete/unnecessary packages, type into the Terminal the command line, see Pic 12:
sudo apt-get autoremove
then press the Enter button.

Pic 12 - Refer to Step 5. Removing the unnecessary packages.


6. When asked, see Pic 13:
Do you want to continue [Y/n]?

Type in:
y
to continue the removal process then press the Enter button.


Type in:
n
to quit the removal process then press the Enter button.


The removal process is done when the line (user@computer:~$), see Pic 14:
aisha@Lenovo-Aisha:~$
appears.

Pic 13 - Refer to Step 6. Confirming the removal process.


Pic 14 - Refer to Step 6. The removal process is complete.



Note 2: Upgrade

Sometimes you get the, see Pic 15:
0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
response.

Pic 15 - Packages need to be upgraded.


7. To upgrade the packages, type into the Terminal the command line, see Pic 16:
sudo apt-get upgrade
then press the Enter button.

The list of packages needing upgrade will be listed, see Pic 17.

Pic 16 - Refer to Step 7. Upgrading the necessary packages.


Pic 17 - Refer to Step 7. The list of packages needing an upgrade.


8. When asked, see Pic 18:
Do you want to continue [Y/n]?

Type in:
y
to continue the removal process then press the Enter button.


Type in:
n
to quit the removal process then press the Enter button.


The removal process is done when the line (user@computer:~$), see Pic 14:
aisha@Lenovo-Aisha:~$
appears.

Pic 18 - Refer to Step 8. Confirming the upgrading process.



Part B: Update using the Update Manager

Pic 19 - The Update Manager window.


9. Run the Update Manager window.


9.1. Go all the way to the left of the screen to call-out the Launcher. Skip this step if your Launcher is not auto-hidden.


9.2. In the Launcher, click the Dash Home icon, see Pic 2 and Pic 20.

Pic 20 - Refer to Step 9.2. Accessing the Update Manager window.


9.3. In the Search field, type-in "update", see Pic 20.

The search results will auto-filter.


9.4. In the filtered results, click the Update Manager icon, see Pic 21.

The Update Manager window will appear, see Pic 19.

Pic 21 - Refer to Step 9.4. The Update Manager icon.


10. In the Update Manager window, click the Check button to check for updates, see Pic 22.


Pic 22 - Refer to Step 10. *No updates at the moment to make screenshot.*


11. A tick mark is automatically put in the box next to the updates.

Click the Install Updates button to install the updates, see Pic 23.


Pic 23 - Refer to Step 11. *No updates at the moment to make screenshot.*



Note 3: Pinning the Update Manager to the Launcher

12. To "pin" the Update Manager icon in the Launcher, run the Update Manager. See Step 1.


13. Right-click the Update Manager icon in the Launcher, see Pic 24.

In the right-click menu, click Lock to Launcher.

Pic 24 - Refer to Step 13.



Wassalam.

Thursday, December 30, 2010

How to remove custom fonts (user fonts) on Ubuntu

Update: 3 January 2011 / 28 Muharam 1432H, Is.

24 Muharam 1432H

After clicking the Install Font button, see Pic 1, and trying out a new font, it turns out that that new font isn't what i want on my list of fonts. But how does one remove it?

Pic 1 - The Install Font button. Easy to install, hardly know how to uninstall :p


Before removing the unwanted font, Pic 2:

Pic 2 - The unwanted font shown in OpenOffice.org Writer. Before removing.


After removing the unwanted font, Pic 3:

Pic 3 - The unwanted font shown in OpenOffice.org Writer. After removing.


Like any seasoned Windows user, i did go through the fonts file, see Pic 4, but couldn't find the font i want to delete. By the way, the file is located here:
File System > usr > share > fonts.

Pic 4 - Locating the fonts folder in Ubuntu.


So, i did some searching and found these to be helpful:
- How to remove installed fonts in Ubuntu
- How to Delete Ubuntu Fonts

Turns out that a font installed using the Install Font button is referred to as custom fonts or user fonts.

Here, i refined the explanations.


1. Run the Terminal. The Terminal, shown in Pic 6, is located here:
Panel > Applications > Accessories > Terminal. See Pic 5.

Pic 5 - Refer Step 1. Running the Terminal from the menu.


Pic 6 - The Terminal, freshly loaded.


2. Type in the command as follow:
cd /home/username/.fonts
Source: How to remove installed fonts in Ubuntu
Refer Pic 7.

Pic 7 - Refer Step 2. Changing directory to the fonts folder.


3. Change the part username in Step 2 to your username. Mine is aisha. See Pic 8.

In my case, it's:
cd /home/aisha/.fonts
Then press the Enter button. A new command line appears as shown in Pic 9.

Pic 8 - Refer Step 3. Changing the username in the command.


Pic 9 - Refer Step 3. We are now in the fonts folder.


4. To see the list of items in the fonts folder, type the command as follow:
ls
Source: How to remove installed fonts in Ubuntu
Refer Pic 10. Then press the Enter button. A list of custom fonts appears, similar to Pic 11.

Pic 10 - Refer Step 4. Adding command to see the list of items in the fonts folder.


Pic 11 - Refer Step 4. List of user fonts installed in my laptop.


5. From the list, similar to as seen in Pic 11, look for the font(s) you want to remove. Then type in the the command as follow:
rm
Source: How to remove installed fonts in Ubuntu
followed by the name of the font(s) you want to remove. The are two ways to add the font name:
  1. You can either type-in the name, or
  2. Highlight the name. Press Ctrl+Shift+C to copy. Then press Ctrl+Shift+V to paste.
Then press the Enter button.

In my case, i want to remove the Arabic Typesetting font. So, my command, as shown in Pic 12, will be like this:
rm arabtype.ttf

Pic 12 - Refer Step 5. Adding the command to remove the unwanted font(s).


6. Upon pressing the Enter button in Step 5, a new line to confirm the removal appears. Refer Pic 13.

To proceed with the removal, type in:
y
then press the Enter button, see Pic 14. Then command line seen in Pic 9 appears, also shown in Pic 15. The removal process is completed.

Pic 13 - Refer Step 6. Confirmation required.


Pic 14 - Refer Step 6. Removal confirmed.


Pic 15 - Refer Step 6. Unwanted font has been removed.