Ubuntu Forums FAQ

From Some Wiki
Jump to: navigation, search


About This Page

I am a frequent participant on the Ubuntu Forums, and I have noticed a few questions (and their variations) being asked over and over again. So I created this page to archive and categorize these questions and their answers, so that whenever I see one of these questions being asked, I can simply point to this page (and I encourage other forums participants to do the same - as well as to help flesh out this FAQ). You may also wish to refer to my other Ubuntu-related page, Ubuntu:Chronicles, which is a customization guide for Ubuntu Breezy (5.10).

I need root privileges, but there is no root password!

Ubuntu does not create a root password by default. You should use sudo with your own user password. For more information about sudo and the permissions system, see RootSudo Wiki Page and Aysiu's Permissions Tutorial.

Note: some of this stuff is a bit outdated...

My user cannot use sudo. What do I do?

There are many reasons why this may come about.

  • If you use the "expert" install instead of the "default" install of Ubuntu, it will create a root account and your regular account, but the regular username you create does not get the privileges to use sudo.
  • If you create another username after the default username, that username won't get sudo privileges by default.
  • If you've been mucking around with your system, something may have gotten messed up :).

At any rate, we are going to fix this right now.

  • Reboot in recovery mode (choose recovery mode from the GRUB menu). This will throw you into a root shell.
  • Run command
  • This command will start editing the file /etc/sudoers, which sets the privileges for using sudo. Make sure the file has these contents (it may have some more commented lines at the beginning, that is immaterial):
# Defaults

Defaults        !lecture,tty_tickets,!fqdn

# User privilege specification
root    ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin  ALL=(ALL) ALL
  • Hit Control-X to save and exit
  • Now open the file /etc/group with command
nano /etc/group
  • Add your username to the admin group
  • Hit Control-X to save and exit
  • Reboot into regular mode, and enjoy the new sudo privileges that your username should now have.

Note: there is a slightly more detailed tutorial on restoring sudo access, with screenshots and everything, here.

I installed Ubuntu, but when it boots, I get a black login screen, and no graphics. What to do?

There are two possibilities here. If you used the "server" install instead of the default, the GUI stuff did not get installed (that's what server install is supposed to do).

If you used server install

In this case, if you want Gnome, you should run command:

sudo aptitude update
sudo aptitude install ubuntu-desktop

if you want KDE, run:

sudo aptitude update
sudo aptitude install kubuntu-desktop

if you want XFCE, run:

sudo aptitude update
sudo aptitude install xubuntu-desktop

If you used the default install

In this case, there is something wrong with your X configuration (X is the windowing system for linux). You can play around with the configuration interactively by running

 sudo dpkg-reconfigure xserver-xorg

and it will ask you a bunch of questions about your setup, and then try running X again with command


One of the "failsafes" you can try when doing that is to select the "vesa" driver for your video. That has a very high probability of getting your video up and running, but will leave you without 3D acceleration and fancy stuff like that. But at least you will have a GUI.

Alternatively, you can edit your /etc/X11/xorg.conf file manually, by running command

 sudo nano /etc/X11/xorg.conf

(notice that X11 is capitalized. Linux is case-sensitive, and x11 is not going to work) and then finding the line that looks like

 Device "ati"


 Device "nv"

and changing it to look like

 Device "vesa"

Save and exit, and try


again. (This procedure is equivalent to choosing vesa through dpkg-reconfigure method).

How can I access my windows drives/partitions?

To access a drive, it has to be "mounted" to the filesystem. Ubuntu does not mount windows drive by default, so you have to make some configuration changes yourself. Note that linux can read and write Fat32 partitions, but can only read NTFS partitions, so do not attempt to mount NTFS partitions with write access - modifying files on NTFS partitions will damage the partition and it will have to be repaired. The basic procedure for mounting drives is as follows:

  • Find out the device name for the partition you want to mount (use command "sudo fdisk -l" to see a list of your partitions)
  • Add the appropriate entry to your /etc/fstab file
  • Issue a "mount" command with the appropriate arguments to mount it (if you set the default options in fstab, it will henceforth be automatically mounted on boot)

Now that we have the overview of the steps we need to take, here are some links to detailed howtos on mounting partitions:

How do I install software on Ubuntu?

Here is a list of the various ways you can install software on Ubuntu, starting with the easiest one.

  • Install from the Ubuntu software repositories, using Synaptic (if on Gnome) or Adept (if on KDE) or apt-get or aptitude (if you like commandline)
  • Download the appropriate .deb file, and install it from commandline with "dpkg -i" or with the package installer (only available on Dapper 6.06 version of Ubuntu)
  • Download the .rpm file, and install it using command "alien" (you have to install package "alien" from the repositories, first)
  • Download the source distribution (.tgz or .tar.gz file), and extract somewhere. Then change to directory where you have it, and run in succession, "./configure", "make", "checkinstall". In order to build from source this way, you first have to install packages "build-essential" and "checkinstall" from the repositories.

Now that we have the basic overview of ways to install software, here are some more detailed guides for the various ways to install software:

Where is this "terminal" everyone keeps talking about?

  • If you use Ubuntu/Gnome: Applications > Accessories > Terminal
  • If you use Kubuntu/KDE: KMenu > System > Konsole

For a more detailed howto (with pictures!), see here.

I want to learn about the commandline and the basics of linux

There are, as you might imagine, quite a lot of resources on the web about learning linux, learning the command line, shell scripting, and the like. Here are some links that you will find quite helpful if you are looking to learn your way around the command line.

I Want to Install Multimedia Codecs/Plugins

The commandline approach

Some wmv files will not play correctly even with the codecs installed, this is because they use a proprietary codec, however some will still work.

The magical automatic approach

Out of the two, EasyUbuntu is supposed to be a safer and more system-friendly alternative. Still, many people use Automatix without any ill effects. So choose whichever one you like better.

When I go to my router config/control page, the Ubuntu computer name is listed as "unknown" or not at all. I want to see a name there

That is normal behavior, because ubuntu doesn't by default send a name to the router. To get it working like you want, we have to do the following:

  • Edit file /etc/dhcp3/dhclient.conf
 sudo nano /etc/dhcp3/dhclient.conf
  • Find the line that looks like
 #send host-name "andare.fugue.com";
  • Change the line so that it looks like:
 send host-name "the_hostname_you_want_to_send_goes_here";
  • Save and exit

Now, next time your computer connects to the router to get an IP address, it will send that name, and it will appear in the router config page.

Which is better, KDE or Gnome? How do I get one or the other?

There is an excellent writeup on KDE vs Gnome here.

If you want to try KDE, or Gnome, or XFCE (an more lightweight alternative), all you have to do is install the appropriate package.

  • For KDE
sudo aptitude update
sudo aptitude install kubuntu-desktop
  • For Gnome
sudo aptitude update
sudo aptitude install ubuntu-desktop
  • For XFCE
sudo aptitude update
sudo aptitude install xubuntu-desktop

Then the appropriate option will show up in your session selector on your login screen, and you can choose it and try it.

What's the difference between aptitude and apt-get?

Aptitude does a much better job of keeping track of dependencies, and is smarter about package versions. Here is a nice writeup of the major advantages of aptitude over apt-get. In general, I would recommend using aptitude instead of apt-get all the time, since there are no downsides to using aptitude, only upsides. The command syntax is exactly the same as with apt-get, so it is easy to switch.

Do I need firewall, antivirus, disk defragmentation, on Linux?

For a discussion of these issues, see this thread in the Ubuntu Forums security section.


The default Ubuntu install does not leave any ports open, so the firewall is not exactly a necessity. However, it doesn't hurt to have it running, just in case, and it doesn't use up any system resources. To get your firewall up, you can install package "firestarter" if you like fancy GUI stuff. Or, since firestarter is just a graphical frontend for iptables, you could just create a simple iptables script. For an example of a simple but robust firewall config and how to set it up, see here.


At this point there are no linux viruses in the wild, so there is no need for antivirus. So, unless you want for some reason to scan for windows viruses, you do not need an AV. If you do want an antivirus, there is package "clamav" available in the repositories.


The linux ext3 filesystem generally takes good care of itself without user intervention, so there is no need to run defrag on your linux partitions.

Will Ubuntu work on my computer? Will it recognize all of my hardware?

It is hard to tell without knowing exactly what hardware you have. The easiest way to check is to burn yourself a LiveCD, boot with it, and see if everything works. There is also a hardware compatibility list on the Ubuntu wiki, but it is not really exhaustive. The other thing you can do is search google for your hardware make/model +linux, or the Ubuntu Forums for your hardware make/model and see if anything comes up.

I installed Ubuntu, but after a few hours the computer locks up completely. What should I try?

Here are some of the things you should try, in order of ease and likelihood of solving your problem.

  1. Turn off your screensaver (or switch to using the "blank" screensaver), and see if the problem goes away
  2. Switch your video driver to "vesa" in /etc/X11/xorg.conf (see this section for detailed instructions), and see if the problem goes away
  3. Reboot and choose "memtest" from the grub menu; run the memory test, and see if all your RAM tests out ok. If not, time to get some new RAM chips (or maybe just reseat the old ones).

How can I make Ubuntu execute a script or program at startup?

If you need to execute something after you log into your Gnome session, then all you need to do is choose System>Preferences>Sessions from the menu, choose the "Startup Programs" tab, and add the path to whatever script/program you want to run at startup of session.

If you need to run the script at boot time, before the GUI even loads, then it's time to learn about the linux runlevel system. This page and this page will teach you in some detail about it. Here I will tell you about the basics very briefly.

  • The startup/shutdown scripts all live in directory /etc/init.d
  • Linux systems can operate in several "runlevels". The default Ubuntu runlevel is 2.
  • Runlevel configuration is done by placing links from /etc/rcX.d/ to scripts in /etc/init.d (where X is the number of the runlevel)
  • The link naming convention is that the ones that start with S run at startup, ones that start with K run at shutdown, and the numbers allow you to specify the order in which the scripts run.
  • The program "update-rc.d" simplifies the managing of the links for you.

So, now that we know all that, suppose we have a script called "mybootscript", sitting on our Desktop, that we wish to run at boot. To accomplish this, we would place that script into /etc/init.d, using command

sudo cp ~/Desktop/mybootscript /etc/init.d

make it executable just in case it is not

sudo chmod 755 /etc/init.d/mybootscript

then add the appropriate links using update-rc.d, as follows:

sudo update-rc.d mybootscript defaults 90

which would make the script start up on runlevels 2-5 (the defaults. run "man update-rc.d" for more details), with order 90 (basically, after everything else).

And we are done. Now just reboot and see if it worked!

Personal tools