Sunday, January 18, 2009

Ubuntu Linux

I just installed the latest Ubuntu Linux, and thought I'd write a post for people new to Linux, who are curious but have kept their distance.

Ubuntu Linux is a complete free operating system - a competitor to Windows and Mac build with a philosophy of openness rather than a proprietary model. Linux alone (the "kernel") provides the bare essentials of an operating system, so people package it into readily usable forms - together with many open source applications and components. These are called distributions. Presently, Ubuntu is the most popular Linux distribution. It makes Linux simple for anyone to set up and use.


Getting Started

To install Ubuntu, download the latest version, burn it to a CD, and boot to the CD. You can try it out without installing or risking anything. This gives you an impression of the look and feel, and lets you try preinstalled applications, but is much slower than normal because it's running directly off the CD. You can install Ubuntu alongside an existing Windows installation, as a "dual boot" setup where you can choose when you start the computer which system to use. This is the default setting in the installer.

Once you have it installed, you can figure out what everything is by clicking or right clicking on it. You can customize the panels as much as you want - delete things, add things by dragging and dropping.


Installing Programs

One of the most different things from Windows is the way in which software is installed and managed. In Ubuntu, there is an entire body of software dedicated to installing, updating, and uninstalling applications in the form of "packages". This is called a package manager. Ubuntu's package manager is APT - Advanced Packaging Tool.

Ubuntu maintains a huge list of applications that can be automatically installed by the package manager. To install or remove programs, you can go to Applications -> Add/Remove, which lets you browse and search packages. To install or uninstall something, check or uncheck the box next to the package, then hit "Apply Changes." After a program is installed, it will appear in the "Applications" menu, filed in the right place.

Another program besides Ubuntu's "Add/Remove Programs" which lets you graphically manage packages is Synaptic - it also uses APT under the hood.


Standard Tools

Ubuntu comes preinstalled with open source alternatives for most tools most people use already:
  • Office -> OpenOffice
  • Photoshop -> GIMP
  • Internet Explorer, Safari -> Firefox
  • AIM (or any IM client) -> Pidgin
  • Skype -> Egika Softphone
  • Outlook -> Evolution Mail and Calendar

Keyboard Shortcuts

There are numerous standard keyboard shortcuts which make working in Ubuntu very efficient:
  • Alt+tab - switch between windows
  • Control+alt+ left/right arrow keys - switch between desktops
  • Alt+F4 - close the current window
  • F11 - fullscreen mode
  • F2 - rename a file

The Terminal


The terminal is very powerful. It allows you to enter commands to the operating system directly. Most stuff that you can do in Ubuntu with menus, windows, and buttons can probably also be done by entering a command in the terminal. It can be found under Applications -> Accessories -> Terminal.

One common use for the terminal is to install programs. For example, to install Wine, a system which lets you run most Windows programs in Linux, can be installed with one command:
sudo apt-get install wine

"sudo" gives you the power to change system files (you must manually enter your password - this is one reason why Linux is so secure)
"apt-get install" is the command to access the installation mechanism of Ubuntu's package manager APT (Advanced Packaging Tool)
"wine" is the name of the Ubuntu package you want APT to install. There are thousands of Ubuntu packages available.

You could also install any package from Applications -> Add/Remove (in fact, that program uses the apt-get install command), but once you know the package names of the programs you use often, you'll find it's faster to use the terminal.

Graphics Drivers

Ubuntu can readily install proprietary graphics drivers for you (NVidia, ATI), but you need to explicitly do it: System -> Administration -> Hardware Drivers -> click the one you want -> Activate (restart probably required). These drivers are not automatically installed because they are not open source - they are packages containing propreitary software.


Desktop The Infamous Desktop Cube

If you have a decent graphics card, and drivers installed, then some desktop effects should be enabled by default:
  • Window key+ e - show all desktops
  • Shift+alt+up arrow - show all windows
  • Window key+n - invert the colors of the current window
To get the desktop cube, you'll need to install the settings manager for the desktop effects, which is actually it's own project called compiz. Enter the following command in the terminal to install the settings manager:
sudo apt-get install compizconfig-settings-manager

Now open System -> Preferences -> CompizConfig Settings Manager. There, under "Desktop" check the box next to "Desktop Cube" (click yes, disable Desktop Wall) and also check "Rotate Cube" (Effects -> 3D Windows is cool too). Now try control+alt+arrows to switch between desktops. Control+alt+drag mouse lets you rotate the cube.

I hope you enjoy Ubuntu!

Please comment on this post if you have questions (such as "how do I do xyz that's really easy in Windows?"), comments, or suggestions for this introduction.

8 comments:

N said...

Curran: good explanation but you missed the command line at the end of the compiz section...

any ideas on editing grub? I'm sure there are apps for it...

so should I bag Synaptic and get APT?

I've done three installs so far: I bought Pat an Asus netbook and started checking it out then.

Bye

curran said...

Ah yes! sorry about that missing desktop cube section. I fixed that.

To configure GRUB, edit it's configuration file at /boot/grub/menu.lst with the following command

sudo gedit /boot/grub/menu.lst

(sudo gives you access to write the file, and gedit is a notepad-like text editor)

You can change the default OS by changing line 14, the wait period by changing line 19.

Synaptic actually uses APT under the hood - it is just like Ubuntu's "Add/Remove Programs" program in that it lets you graphically manipulate packages through APT, hiding the details of the commands.

I hope Ubuntu works out for you guys!

N said...

need a good app for watching DVDs and what about Divx? I have lots of videos from newsgroups that are Divx...

also - is there an FLV viewer for offline flash video files.

and what is the location of my firefox cache?

thanks

N said...

also: I need some help with persistence -- I boot up and find apps need to be reinvoked and panels have moved back to their default locations: is there a way to get things to stay put, universally or is it an ala carte approach?

for example: I was using the avant window navigator, which disappears upon reboot; also, I prefer the bottom panel to rest below the top 'task bar': after reboots, it will be either back at the bottom or above the top bar.

got to walk my dog...

curran said...

For watching DVDs and all kinds of media files, try VLC:
sudo apt-get install vlc

(then it appears in Applications -> Sound and Video)


I think the firefox cache is in home/.mozilla (it's a hidden folder - press control+H to show hidden files and folders)

That's wierd about the non-persistent panels, my panels stick. I've never used avant though, maybe that has something to do with it.

Pal said...

it was my last click to the link google offered -> pointing to ur bog.and am stuck to it. found it very cool and effective.

i am using windows systems and in the way shifting to the Open Source world. I tried different linux distros,our own localized linux NepaLinux here in nepal too.. but Ubuntu is the magic as u are always saying in this blog. i tested it many times from live cd and tried installing. but the screen resolution is not as cool as 1024x768 rather the creepy 800x600. i am used to the higher resolutions in windows but my installed ubuntu 8.04 Hardy Heron doestnot allow me to change the screen resolution, this is the only thing stopping me to switch completely to ubuntu. what should i do?

Pal said...

it was my last click to the link google offered -> pointing to ur bog.and am stuck to it. found it very cool and effective.

i am using windows systems and in the way shifting to the Open Source world. I tried different linux distros,our own localized linux NepaLinux here in nepal too.. but Ubuntu is the magic as u are always saying in this blog. i tested it many times from live cd and tried installing. but the screen resolution is not as cool as 1024x768 rather the creepy 800x600. i am used to the higher resolutions in windows but my installed ubuntu 8.04 Hardy Heron doestnot allow me to change the screen resolution, this is the only thing stopping me to switch completely to ubuntu. what should i do?

curran said...

Hi Pal,

That's unfortunate that you are stuck in 800x600. I have found graphics to be one of the trickiest things with Linux. If the correct drivers are installed, then you should be able to set the resolution to 1024x768 via System -> Preferences -> Screen Resolution, so I suspect it's a driver issue.

Did System -> Administration -> Hardware Drivers work for you?

What kind of graphics card to you have? If it is an ATI or NVidia card, there is a package called Envy (http://albertomilone.com/nvidia_scripts1.html) which usually does a good job of installing the correct drivers. To install (from the terminal):

sudo apt-get install envyng-gtk

To run:

envyng -g