Linux tutorials

Homepage  tutorials About me Programming Screenshots Distros Links Realbasic programs 1 Rb programs 2

tar.gz files

You'll find an abundance of software for Linux so you won't get bored for a while. Some types of software come bundled as tar.gz files. These are compressed files and before you can use them you need to know how to unpack them and  then install them. Lets pretend our package is called packagename-1.0.tar.gz  this is how we'd install it......

1. Open up your favourite terminal (shell)

2.Login as a root user using the su command. 

3.Type tar -xzvf  packagename-1.0.tar.gz       ( x = extract z= zip v= verbose f = file)

4.You'll see a splurge of text and then it should stop. Change to the packages directory eg.. cd packagename-1.0

5.Type ./configure

6.Then you'll see more info, when that has stopped, type..... make

7. Finally type.......make install to install your software

Most packages can be installed this way.But one thing that's worth mentioning is.... when you unpack your tar file, you should always have a look to see if the author has included a readme file.These usually contain further instructions that are useful for installing their software.

Article by Mark. 

 

Uninstalling rpm and debian packages 

You can uninstall these packages via the gui package managment tools if you like.However we're going to look at how to uninstall a package using the commannd line.

First off rpm packages 

1.Open up a terminal

2.Switch to root using the su command

3.Type in  rpm -e packagename-1.0.i386.rpm

4. Hit enter

5. Check the package has been removed by typing......... rpm - q packagename-1.0

 

Now Debian packages

1. Open a terminal

2.Switch to root

3.Type in  dpkg - r packagename-1.0.i386.deb

4.Hit enter

5. Check to make sure the package has been removed   dpkg - s packagename-1.0.i386.deb

One final note, running as root is very dangerous! as soon as you have finished you should always revert back to user status. Remember you can do great damage to your system as a root user! 

Mark. 

 

How to use apt / synaptic package managment tools 

Apt is debians advanced package managment tool. It's a command line program you run in a terminal. There are a few commands and it's pretty straightforward to use. Synaptic is the frontend for apt. Synaptic is a nice gui interface which you can download and use instead of the command line program. 

 

Basic apt commands

To install software with apt and synaptic you must be logged in as a root user. Then you can begin your software installations.

Installing software using apt

1. apt-get install mplayer

Uninstalling packages

2.apt-get remove mplayer

Updating your system

3.apt-get update              apt-get upgrade

Here is a list of some more common apt commands

Source...........download source archives

build-dep.......configure and build dependencies from source packages

dist-upgrade.. upgrade your system to the latest release

clean.............erase  downloaded archive files

autoclean.....erase old downloaded archive files

check...........verify that there are no broken dependencies. 

Mark. 

 Installing realplayer

sudo apt-get install realplay

This will install realplayer 10 from the plf repository

 Installing amarok multimedia player

sudo apt-get install amarok

Upgrading your Ubuntu Linux distro 

This will work for a dapper to edgy upgrade, and probably for older versions of Ubuntu.

1.Open a terminal window

2.Type in.... gksu update-manager -c     "the -c will tell it to look for upgrades"

3.Enter your user password at the prompt

4.You'll see a screen with your upgrade options on it. Enter upgrade for the newer distro.

5.You'll be asked if you want to continue to upgrade, except and contiunue

6.The system will download the various packages

7.After the installation you'll be prompted to reeboot your system.

8.After that you'll be able to boot into your new os! 

Making an internet connection using pppoe 

How to configure a adsl internet connection in ubuntu.

1. Open a terminal

2.Type in sudo pppoeconf

3.Hit enter

4.You'll see a screen read the instructions and click yes, keep on going until you come to the screen where you need to enter your details.

5.At enter your isp info example...... dave@btinternet.com

6.Click to the next screen and enter your password

7.Continue to click the default settings.(which will be ok in most cases)

8.You'll be given the choice to start your connection at boot up time, if you click yes to this option, your computer will connect to the internet automatically every time your system boots up.

Mark. 

Changing your user account password in ubuntu

If you want to change your user account password in Ubuntu, this can easily be acheived by a few simple commands in the terminal.

1.Open a terminal

2.Type passwd into the terminal

3.You'll see some text  "changing password for name"

4Under that you'll see current UNIX password, you'll have to type in your old password here and hit enter

5.Next you'll see some text that says.... enter new UNIX password, enter your new password and then hit enter.

6. Finally you'll see some text that says retype new UNIX password. So retype your new password again and hit  enter. 

7.After that you'll see passwd:   password updated successfully

8.Exit the terminal, you have a new user password. 

Mark. 

Creating a root password account with Ubuntu 

1.Open up your favourite terminal program

2.type in    sudo passwd root

3.Eter your user password when prompted

4.Retype your new root password at the prompt and hit enter

5.Your root password is now set up.

Disable your root password 

Type sudo passwd - 1 root

Mark.

Installing the kde desktop on ubuntu 

1. Open a terminal

2. Type in  sudo apt-get install kubuntu-desktop

Installing gnome desktop for kubuntu users 

1. Open up a terminal

2.Type in sudo apt-get install ubuntu-desktop

Installing the xfce desktop 

1. Open up a terminal window

2. Type in sudo apt-get install xububtu-desktop

Mark. 

Installing fluxbox window manager 

Fluxbox is a lightweight window manager especially suited for low end machines with linited ram etc. 

1.Open a terminal

2. sudo apt-get install fluxbox 

Mark. 

Editing your apt sources list 

What's the point of editing your apt sources list? Well for one you could install new software repositories and delete any old ones that you no longer need!

Here's how to add new repositories to your sources list.....................................................

1.Open up a terminal window

2. Type this in at the command prompt..............$cd  /etc/apt/ and hit enter

3. Then type........................................ $ sudo gedit sources.list a splurge of text will appear in the terminal.But after that a text editor window should pop up with your present sources list inside.

4.It should look like this...................................

deb-src http://au.archive.ubuntu.com/ubuntu/ dapper main restricted

 

## Major bug fix updates produced after the final release of the

## distribution.

deb http://au.archive.ubuntu.com/ubuntu/ dapper-updates main restricted

deb-src http://au.archive.ubuntu.com/ubuntu/ dapper-updates main restricted

 

## Uncomment the following two lines to add software from the 'universe'

## repository.

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## universe WILL NOT receive any review or updates from the Ubuntu security

## team.

deb-src http://au.archive.ubuntu.com/ubuntu/ dapper universe

 

## Uncomment the following two lines to add software from the 'backports'

## repository.

## N.B. software from this repository may not have been tested as

## extensively as that contained in the main release, although it includes

## newer versions of some applications which may provide useful features.

## Also, please note that software in backports WILL NOT receive any review

## or updates from the Ubuntu security team.

deb http://au.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

deb-src http://au.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

 

deb http://security.ubuntu.com/ubuntu dapper-security main restricted

deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted

deb http://security.ubuntu.com/ubuntu dapper-security universe

deb-src http://security.ubuntu.com/ubuntu dapper-security universe

deb http://www.getautomatix.com/apt dapper main

 

#AUTOMATIX REPOS START

 

deb http://archive.canonical.com/ubuntu dapper-commercial main

5.You are free then to add extra repositories to this file or remove ones you no longer require.

6.Once you've added the new repositories you should save the file and exit.You can then go into synaptic and click on the reload button to update your system.

Just a quick bit of advice, make sure you make a note of what you add or remove! Better still back everything up! That way if you encounter any problems, you can always return your sources list to their original state.

Mark. 

 

 

 

 


 

 

 


 

 

 

 

 

 

 

Installing rpm / deb packages

There are two common package types that come with Linux first an rpm package. This is a red hat based package and usually comes with distros like suse, red hat, fedora and a few other systems. The other package extension you'll see is deb, which is Debians own package managment system.  One of the easiest ways to install these packages would be to use  a graphical package manager that comes with your distro. However you can install these packages using the command line. Why use the command line over a graphical tool you might ask yourself? Well sometimes it can be quicker,  simply to open up a terminal and type in a couple of commands.

Installing an rpm package

1. Open your favourite terminal

2.  log in as root using the ....su  command

3. Type in  rpm - i packagename-1.0.i386.rpm     ( - i "flag = install" )

4.Wait a few moments for the package to install.

5. You could then type................. rpm - q packagename-1.0   "the  q flag = query" if the package is installed, it will then show up in the terminal.

6. Run your program by typing it's name into the terminal.

7. If you would like to view extra data as your package is installing itself you could always add the percent flag like this.................. rpm  - i --percent packagename-1.0.i386.rpm.

This will give you a percentage output when the program is being installed eg..

rpm - i --percent packagename-1.0.i386.rpm

% 0000000

%1000000

%2000000

%3000000 

etc...............................................................

 

Installing debian packages 

It's pretty much the same as above except with a couple of minor differences............................................

1. Open a terminal

2. login as root

3. Type.................. dpkg - i packagename-1.0-i386.deb

4. Hit enter and wait for the package to install.

5. If you want to see if the package is installed, type.... dpkg - s packagename-1.0

6.Run the program from the terminal by typing in it's name.

Mark. 

Installing synaptic 

Synaptic is the graphical frontend for apt. Synaptic is a very nice gui that makes it easier for you to manage your software, and installing it is a snap!

 1. Open a terminal

2.Log in as a root user

3. Type apt-get install synaptic

4.Wait for it to download and install.

5. Type synaptic into the terminal window and run it from there.

Mark. 

Installing java runtime 

When you install java runtime you'll be able to view java animations on the net. Here's how to do it.

1. sudo apt-get install sun-java5-jre sun-java5-plugin

2.Agree to the licence

3.To configure J2SE for programs such as frostwire and as a plugin for mozilla firefox type.....

4.sudo update-alternatives --config java then choose the option that corresponds with J2SE. 

Mark. 

 

Installing flash player(macromedia flash) plug-in for Mozilla Firefox

1.Open a terminal

2.Type in sudo apt-get install flashplugin-nonfree

3.sudo update-flashplugin

4. Sit back and wait for it to install.

Mark. 

Installing vlc multimedia player with firefox plugins 

1. sudo apt-get install vlc vlc-plugin-* mozilla-plugin-vlc

To stream video using vlc you also need to install theses packages

2.apt-get install avahi-daemon

   apt-get install avahi-utils

Installing mplayer

1. sudo apt-get install mplayer

Installing totem multimedia player

1.sudo apt-get install totem-gstreamer-firefox-plugin

Then simply restart firefox

Mark.

Installing software using synaptic package manager

Synaptic package manager is the gui front end of the command line program apt.Synaptic can be used to 

install software, upgrade software and remove software, these are the basic functions. First of all let's find out where synaptic lives.

1.Click on system-------administration and go down the list until you see "synaptic package manager" (I'm using the gnome desktop interface here,not kde)

2.Click on synaptic

3.You'll be prompted to enter your user password before you can go any further.

4. First things first, your synaptic doesn't include all repositories by default,this is where you'll find all the software such as codecs and other software packages that you might need. So we must enable the other repositories, to take advantage of the wealth of software.

5.Click on settings, and when the settings box opens you'll see a list of repositories. The ones that are ticked are enabled, the others that aren't ticked are not enabled.

6.Scroll down and tick the boxes you want.

7.You could also click on add and tick the community and non free repositories,click add after that.

8. Then close the box.

9. You'll see another box spring up after that saying........repositories changed, just click close

10.To update the repositores just click the .....reload button at the top and wait for the software information from the new repositories to be loaded.This will take a few minutes or so, and after that you can then check out and download the software from your repositories.

Searching for software 

Ok We've heard about a new piece of software, but we're not sure whether it's in one of the software repositories or not.What should we then do?

1. In synaptic you'll see a button at the top called search, just click on it and enter the name or description of the package your looking for. If the package is installed on the machine, then it'll show up on the search. If the package is located in one of the software repositories, it'll show up in that repository. How do we then install it? Simply by checking the box and apply! The package manager will sort out any dependency problems for you, so no need to worry about missing dependencies! 

Mark. 

Installing clam antivirus 

Why install a virus program on Linux you might ask? I thought Linux was suposed to be virus free? Well it's always handy to have a virus checker to make sure you don't pass any windows viruses on to your virus infested windows chums! Clam anti virus is easy to install and update.

1. Open a terminal window

2. sudo apt-get install clamav

Mark.

Installing a gui for clamav 

For those of you who are afraidof the command line, clamav comes with a nice gui called klamav.And installing it is a snap!

1.Open your favourite terminal

2.sudo apt-get install klamav

Mark.

Using clamav at the command line 

1. Scanning, open a terminal

2.change to the directory you want to scan, example........... mark@linux-mark-$ cd /lib 

3.Type in clamscan and wait

4.Congratulations, you've just scanned your lib directory!

Updating your clamav virus definitions 

1.Open a terminal

2. sudo freshclam

3.Sit back and wait for your program to be updated

Mark. 

Using Alien rpm package converter

 Alien is a package manager / rpm package converter which you can use to transform rpm packages into debian packages .deb.Why would you want to use alien? Simple..... let's say for example you want to install a software package on your system.First of all you've checked your software repositories and the package is not listed.Next you search the net for that particular package, and hey presto you find it! :-) But...... it's an rpm :-( what now!

1. Open a terminal window

2. cd to the directory where the package is.

3.Type at the command prompt.........alien -d packagename.rpm

4.Hit enter and sit back and wait for the rpm to be converted into a deb package

5.Install either using alien or better still at the command line  dpkg -i packagename.deb

Installing and running windows applications on Linux 

You can now run many windows applications on Linux using a program called wine! Wine is available from the wine website  www.winehq.com.

Installing from the WineHQ APT Repository with Synaptic:

 

To install Wine from the WineHQ APT repository, you need to configure APT to look in the right place for the Wine packages. On Ubuntu systems, and those using the Synaptic Package Manager, this can be done easily by opening up Synaptic (System->Administration->Synaptic Package Manager) and selecting Settings->Repositories. Then click add, select custom, and enter one of the following:

 

For Ubuntu Edgy (6.10):

deb http://wine.budgetdedicated.com/apt edgy main

 

For Ubuntu Dapper (6.06):

deb http://wine.budgetdedicated.com/apt dapper main

 

For Ubuntu Breezy (5.10):

deb http://wine.budgetdedicated.com/apt breezy main

 

Then, simply click reload and search for the package 'wine' for installation. If you already have a 'wine' package installed, selecting mark all upgrades should update Wine to the newest version.

 

Info by www.winehq.com 

How to set a screensaver on your system 

1. Click on system - preferences and then look for the screensaver entry

2.You'll see a list of screensavers

3. Click through until you find one you like

4.Then click on it and click close simple!

5. You can of course alter the bar you see to set the time duration for the screensaver. 

Mark.

Customizing your system using the art manager 

The of the many good things about Linux is that you can make it look the way you want.

For example............... if you install the art manager you can download new splash screens, windows borders and icon themes and there's hundreds to choose from!

1.Go into synaptic and type in the search bar gnome-art

2. Put a tick in the box for gnome art and click apply

3. If you prefer you can download it by using the terminal

4. Open a terminal and type in sudo apt-get install gnome-art

5. Enter your password and wait for it to download

Mark.