Since 2009 this website is a complete quick guide for Linux, both for beginners and for experienced users!

Ubuntu 14.04 Trusty Tahr has been released!

A star of the Ubuntu family: Xubuntu!

4days since
Ubuntu 14.04 LTS Trusty Tahr

Release schedule of Ubuntu 14.04 LTS Trusty Tahr

13days since
end of life for Windows XP: quickly replace it by Linux!

The ideal replacement for Windows XP

19 tips and tweaks for Ubuntu


Back to the home page


19 useful tips and tweaks for your Ubuntu:


Make Windows the default option in the Grub boot menu

1. At the beginning of their Linux adventure, many people want Windows to be the operating system that's booted by default, instead of Ubuntu. So that Windows will boot automatically when you make no choice in the boot menu (you'll get over it after a while!).

This is how you do it:


a. First determine on which line in the boot menu of Grub, the Windows boot line currently is (often on line number 5, but not always). This line number is important to know.


b. Now make sure that you have installed the applications gksu and leafpad:

Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

Type (or copy/paste):
sudo apt-get install gksu leafpad

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.


c. Then type in the terminal (use copy/paste):
gksudo leafpad /etc/default/grub

Press Enter


d. Now you can change some things, among others the default boot line.

Find the following line (nearly at the beginning):
GRUB_DEFAULT=0

This is the default boot line. It's set at 0, because..... Grub starts counting with 0 and not with 1. Don't ask me why; probably because nerds derive a deep satisfaction from counting differently from ordinary people....

You have to keep this in mind when making a change. For example: if Windows is at line 5 in your Grub menu, you have to change the 0 into 4:
GRUB_DEFAULT=4


e. Save and close the configuration file. Note: please read on, you're not done yet!


f. Apply the change, by regenerating the Grub menu. Copy/paste the following line into the terminal:
sudo update-grub

Press Enter. Fill out your password: your password remains entirely invisible, not even dots will show, this is normal. Press Enter again.

Now you're done! When you reboot, the Windows boot line should be activated by default.

Forgotten password: what to do

2. Do the following:

a. Boot your computer into Recovery Mode (second option in the Grub Menu), and select the terminal (root).

b. Mount the file system read-write. Type (note the spaces in the command!):

mount -n -o remount,rw /

Press Enter.

Make sure that you type the command correctly; it's easy to make a mistake with the spaces in the command.

Now you might see a warning from mntent, about /etc/fstab. You can safely ignore this.

c. Then type:

passwd your_own_username (for example: passwd john)

press Enter.

Note: when you type your new password, it remains invisible. Not even asterisks will show, which is normal.

d. Type: 

reboot

press Enter.

You're done! Now you can log in with your new password.

No success? The most likely cause of failure is, that you've made an error in the command at step b.

Increase the interval for the file system check

3. A file system check approximately once every 30 system boots, is tedious and unnecessary for most computers. With tune2fs you can change that. For example, if you want to increase the interval to 100, for partition sda2:

Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

Type (or copy/paste):

sudo tune2fs -c 100 /dev/sda2

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

Note: this is only applicable for EXT2, EXT3 and EXT4 file systems.

Make your system faster and quieter

4. There's an important thing you can do, in order to improve the performance of Ubuntu: turn off the three-dimensional visual effects.

You can do that like this.

Force a locked-up application to close

5. It won't happen often, but now and then this trick comes in handy:

a. Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

b. Type: xkill

c. And press Enter. Now the cursor changes into a cross.

d. Click on the application window that you want to kill forcibly.

Avoid some fatal mistakes!

6. There are some mistakes that you definitely will want to avoid.

Create automatically a nice hardware list

7. It's useful to have a hardware list. This is how you generate it:

Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

Copy/paste this line:

sudo lshw -html > hardware.html

press Enter

Your password will remain invisible, not even asterisks will show, this is normal.

Now you'll have a nice document in your personal folder, named hardware.html. Double-click it to view it in your web browser.

Note: do you want to attach this file to a forum message, so that others can help you better to solve your computer problem?

Many internet fora, like the English Ubuntu Forums, don't accept attachments with the extension .html.

So in that case, compress the file first to hardware.html.tar.gz, using archive manager File-roller. The forum helper can then simply download the file and unpack it.


Optimize your Solid State Drive (SSD)

8. Do you have a Solid State Drive (SSD)? Then optimize it for Ubuntu.

Improve the looks of image editor GIMP

9. GIMP is a fine tool for editing pictures. But its user interface is horrendously awful, particularly because of its three separate windows (what were the developers smoking?).

You can improve GIMP's user interface vastly by merging those three windows into one:

Panel of GIMP - Windows - tick: Single-Window Mode

Create an installer package for an application which is already installed

10. Do you have installed an application manually, which isn't in the software repositories of Ubuntu, and have you lost the installer package (x.deb) of it? Then you can "magically" recreate the installer package on the system that contains this manually installed application, by means of dpkg-repack.

An example is easiest. Suppose you have manually installed 'Nero for Linux' some time ago in your Ubuntu, and you wish to do a clean re-install of Ubuntu. Then you can do this:

Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

Copy/paste this line:

sudo dpkg-repack nerolinux

press Enter

Your password will remain invisible, not even asterisks will show, this is normal.

When dpkg-repack has finished its job, there'll be a new .deb package in your home folder, called nerolinux_xxx.deb. You can use that to re-install 'Nero for Linux' (simply double-click it, like a Windows .exe installer), after you've done a clean re-install of your entire Ubuntu.

(continued in the column on the right)



This website is being sponsored by Google Ads.

Are you using an ad blocker? Then you're also blocking my earnings from advertisements....

If you wish to support my website, you can configure your ad blocker to make an exception for this website. Thanks in advance....



Cleanse a text from hidden layout code

11. You'll probably know the problem: you want to copy a piece of text from a certain source, but it's chock-full of hidden layout codes like fonts, bold, colours and all that.

Nasty and bad for your blood pressure, because those codes may easily mess up the layout of your target document.

By means of a small detour you can easily cleanse copied text from all hidden layout codes. Namely by means of a simple text editor like Leafpad or Gedit.

This is how you use Leafpad as "washing machine":

- Copy (with the mouse) the text block that you want to purify of all code, and paste it into an empty text file in Leafpad;

- Now copy the text in the Leafpad file (a new copy operation also);

- Finally, paste the text into the target document. Now it's entirely clean.


Improve Firefox

12. You can improve and optimize Firefox like this.

Manage the memory of the terminal

13. All terminal commands are being stored in a "memory file", so that you can recall them in the terminal by pressing the "up" arrow key on your keyboard.

They're in the file .bash_history in your home folder. It's a hidden file, so first unhide it:

Click in the Ubuntu sidebar on the icon of your home folder (called Files).

Use the shortcut (key combination) Ctrl h to make the hidden files visible, or do it like this:

In the task bar of the file manager: Files - Preferences - check:
Show hidden and backup files

Now close the file manager and open it again.

The hidden files (with a dot before their names) should be visible now. You can view and edit the contents of .bash_history in a text editor like Gedit or Leafpad.

Should you wish to clear all items in the "terminal memory", then you can use this command:
history -c -w ~/.bash_history

If you want to prevent a particular command from being stored in the memory, simply precede that command by a space, when you issue it.

Activate the numeric section of your keyboard

14. Note: only apply this tweak on a system that has been configured for automatic login. Otherwise a system malfunction might occur.

Note 2: this instruction is not meant for laptops without a separate numeric keyboard section, as it's not desirable to have the NumLock on by default on those laptops.

In some cases it's useful for NumLock to be switched on automatically when you start Ubuntu. You can achieve that as follows:

Start Ubuntu Software Center.
Search word: numlockx

Install numlockx ("enable NumLock in X11 sessions").

Reboot your computer.

After logging in, Numlock should be activated.

In case activation failed, do this:
Click on the grey Ubuntu logo (Dash home). Query: startup.
Click on Startup Applications.

Click Add

Give the new addition the name Numlockx and the command:
sleep 10 && numlockx

Click Add.

Reboot your computer.

Disable the keyring password on your laptop

15. The keyring password can be especially annoying when you use automatic login. Restart with a clean slate: wipe the current keyring and start a new one. Then leave the password blank (simply click OK and agree to unsafe storage).

Wipe the current one as follows:

First, make the hidden files visible:

Click in the Ubuntu sidebar on the icon of your home folder (called Files).

Use the shortcut (key combination) Ctrl h to make the hidden files visible, or do it like this:

In the task bar of the file manager: Files - Preferences - check:
Show hidden and backup files

Now close the file manager and open it again.

The hidden files (with a dot before their names) should be visible now.

Double-click the folder .gnome2

Double-click the folder keyrings

Delete the file default.keyring and / or the file login.keyring

Restart your computer.

When prompted for a password, leave the password field blank (simply click OK and agree to unsafe storage).

The warning you get, is exaggerated: there is hardly any risk involved. Only people with physical access to your computer could see the wireless keys. Provided that they know where to look for them....

Disable the touchpad while typing and adapt the delay

16. It's pretty useful to disable the touchpad (trackpad) of your laptop during typing, and tweak the delay. Especially on small laptops.

In Ubuntu, that's easy to configure:

First, the disabling with the default delay: click on the grey Ubuntu logo (Dash home). Query: touchpad.

Click on Mouse & Touchpad

The following option should be ticked:
Disable while typing

Note: in Ubuntu, this only disables the touchpad functions of tapping and scrolling. Mouse pointer movements are still allowed.
In Xubuntu, not even mouse pointer movements are allowed then.

Now the delay. When the touchpad has been configured like this, the default delay is two whole seconds. That's too long and interferes with productivity. When you wish to shorten the delay to one second, you can do this:

First entirely undo the current disabling: remove the tick for Disable touchpad while typing. Close the mouse and touchpad settings window.

Now create an adapted startup application:
Click on the grey Ubuntu logo (Dash home). Query: startup.
Click Startup Applications - Add
Fill out the fields as follows (use copy/paste, that's easiest):

Name:
Syndaemon

Command:
syndaemon -i 1.0 -K -R -t

Comment:
Disable touchpad while typing, with a reasonable delay and only for tapping and scrolling

Click Add and then Close.

Reboot your computer.

Finally, check whether it's working, with the help of the following terminal command (copy/paste the line below in a terminal and press Enter):
ps aux|grep syndaemon

Note: this is a user preference, so repeat this in every user account.

Inadvertently set the system time to UTC (GMT) during install?

17. It's usually a bad idea to set the system time to UTC (formerly known as Greenwich Mean Time), because then the BIOS time may differ from the time of the operating system. Especially on dual boot machines, this may cause trouble.

This is how you can correct this:

a. First make sure that you have installed the applications gksu and leafpad:

Click on the grey Ubuntu logo (Dash home). Query: terminal.
Click on Terminal.

Type (or copy/paste):
sudo apt-get install gksu leafpad

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

b. Then type in the terminal (use copy/paste):
gksudo leafpad /etc/default/rcS

Press Enter.

In this text file, find the line for UTC and change the "yes" into "no".

c. Save the file and reboot your computer.

Copy entire websites to your hard drive

18. You can easily copy an entire website to your hard disk by means of the application httrack. Although httrack is a terminal application without graphical user interface, it's user-friendly and easy.

Note: there's also a graphical frontend called WebHTTrack, but strangely enough this is harder to operate than httrack(!) and even more importantly: it's unstable and unreliable. So I strongly advise against WebHTTrack!

You can install httrack by means of the Ubuntu Softwarecenter.

After installation, just type httrack in a terminal window and press Enter. The rest is self-evident, because then a helpful wizard asks you a few simple questions.

When httrack has done its job, you can find the saved website in the folder "websites" in your home folder. Starting point for viewing is the file index.html, which you can simply double-click, and then it'll be opened by your web browser.

Note: by default, httrack copies an entire website with all its contents, like movies and such. So be careful what you copy, for you can easily flood your hard drive....

Use Xfburn to burn your CD's and DVD's

19. Brasero is the default DVD burning application in Ubuntu. It's, let's put it mildly, often full of nasty surprises.

Luckily, there's a vastly superior alternative: Xfburn. There's a new version of Xfburn for 14.04, which contains many bugfixes and improved disc support. I strongly advise you to install it, because it's simple, stable and won't let you down.

Installing is easy: use the Software Center or this magical invocation for the terminal:
sudo apt-get install xfburn

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

Want more?

Do you want more tips and tweaks for Ubuntu? There's a lot more of them on this website!


To the content of this website applies a Creative Commons license.


Comments