"root" is the most privileged account available on your system. It is the "super user" the user who can do "anything" - delete any file, read any file, and execute any system maintenance task.
The Nvidia installer needs to be run "as root" because it needs to change and modify aspects of the system that, because they are critical to system operation, are only accessible to the root user - e. g. the most powerful user.
I've found that the best way to install the Nvidia "run" files for updating my Nvidia graphics driver is the following. I'm using Fedora, but the basics should remain the same for your distro. (Make sure you save .run file in your home folder, so you know where to get hold of it WITHOUT having the GUI (graphics mode) active.)
Make SURE you have your kernel source available!!! I'm not sure how you do this under Ubuntu, or where you get a hold of it, but you MUST have a "kernel-devel" pacakge installed that is for the kernel you are currently running! If you do NOT have this, you might have trouble installing the new Nvidia driver, or you might not be able to do an upgrade at all since the driver NEEDS your current kernel source to be available to compile against - if you're going to do this by hand, which is what I'm describing here...)
1. Open a terminal
Usually, if you're on the desktop of your system, there is a way to "open a terminal". What this means is that you need to find the icon of a terminal emulator program, like xterm or Konsole. These are usually to be found under "utilities" or "system tools". Look in your installation's menu and click on the relevant icon for the relevant terminal emulator.
2. You should now get a display or screen where you can type commands. The first thing to do is to type
Doing this will "turn you into" the root user. Note that you will need to provide your "root password" which you chose during installation of Ubuntu (I think.) Hope you remember what it is - type it in at the "Password:" prompt you should now see.
3. Once you've typed in the password you should get a new prompt that has a "#" at the end. On my system, when I'm root, it looks like this:
and when I'm a normal (non-root) user it looks like this:
Note that, in my case "$" denotes I'm a normal user, "#" denotes I'm root - most likely your setup will do this too to let you know "who" you are while using the terminal.
4. What you now need to do is switch your system out of "GUI" mode to text mode, so that, in text mode, you can install the NVidia driver. To do this, at the # prompt you now have, type
and press enter.
5. BE CAREFUL
: What you are now going to do is sensitive
and if you make a mistake you can potentially make your Linux install completely unusable.
6. You should see something similar to this:
# inittab is only used by upstart for the default runlevel.
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
# System initialization is started by /etc/event.d/rcS
# Individual runlevels are started by /etc/event.d/rc[0-6]
# Ctrl-Alt-Delete is handled by /etc/event.d/control-alt-delete
# Terminal gettys (tty[1-6]) are handled by /etc/event.d/tty[1-6] and
# For information on how to write upstart event handlers, or how
# upstart works, see init(8), initctl(8), and events(5).
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
7. Press the down arrow until the cursor is on the line that says:
8. Press the letter A on your keyboard. You'll note that very bottom line of the terminal window now should say "-- INSERT --" - this means you can now edit that line's text.
9. Place the cursor on the "5" in the line
and change the 5 to a 3, like so:
10. Press escape (ESC). Then type
to WRITE and QUIT the file.
11. What you've now done is change the runlevel of your system for the next boot. E. g. if you now reboot, you WON'T just go to the graphical desktop you now have, you'll go to TEXT MODE. That is what "id:3:initdefault" means - it means "start up in text mode, with no GUI active."
12. Now, reboot your system. Since you're root, at the "#" prompt, you should be able to just type "reboot":
[root@stefanlinux ~]# reboot
13. Your GUI should now shutdown and the system should reboot. If you dual-boot, select your Linux install when GRUB or Lilo comes up. Don't be alarmed if the system starts up in text mode, this is what you want.
14. Log in as root at the prompt. E. g. type "root" at the prompt, then the root password (e. g. the same one you used when typing "su" just now.
15. At the # prompt (See? it is the same one you saw when you typed "su" just a few moments ago, inside your terminal emulator) go to your home directory, where you saved the .run file (see the start of the reply above.)
E. g., on my system, to get to my home folder I'd do:
[root@stefanlinux ~]# cd /home/stefan/
16. Now you need to make the .run file executable, if it isn't already. In your home folder do
chmod a+x NVIDIA-Linux-x86-270.41.06.run
and obviously, press ENTER (note you can just type the NV of "NVIDIA" (case sensitive) and press TAB and it should auto-compelete)
17. Once you've done the above, type the name of the .run file and press enter. This will start up the Nvidia installer itself.
18. Follow the onscreen prompts. The installer will check for an existing "kernel interface" for your kernel, if it finds one, great. If not, follow the prompts and allow it to compile a new kernel interface against your kernel. This is where the kernel source referred to above comes in - if it is in a standard location (as your kernel-source package hopefully installs, it should be) the installer will find it, but you might need to type the full path to the source if it cannot - I've got no idea where Ubuntu puts kernel sources if installed via the Ubuntu package management facilities).
19. Once the procedure is complete, the installer should report success.
20. Once you're back in the text terminal, again edit the /etc/inittab file as detailed above. Only now, change the "3" in the line
back to a 5, like so:
and wq! the file.
21. Again type reboot. You've now switched back from "boot into text mode" (3) to "boot into GUI mode" (5).
22. Hopefully, when your system now starts up, it will be in GUI mode with the new Nvidia driver active...