Install Software
Table of Contents
- Use the command line to install packages
- Use the GUI to install packages
- Use the GUI to browse the most popular packages
- Install a program from a .deb file
- Install from source (compile)
- Install from .rpm
- Get the dependencies of a package
- Create a .deb file from source
- Run a stand-alone binary file
- Uninstall software in Ubuntu
- See Also
- Obligatory Happy Ending
Use the command line to install packages
- Let your package manager know what’s installed and what’s available in the repositories by opening a terminal window and typing:
- Download the package and its dependencies and install them by typing this command:
- To install many packages at once, add the names of the additional packages, separating each package name from the one before it with a space:
sudo apt-get update
sudo apt-get install foo
sudo apt-get install foo1 foo2 foo3
Use the GUI to install packages
You can search for packages by name and/or description, check which programs are installed, etc.
- Use the package manager in Ubuntu:
- Open the main menu.
- Choose System
- Choose Administration
- Choose Synaptic Package Manager
- Use the Reload button to update the list.
- Browse or search the packages.
- Mark the packages you wish to install or uninstall.
- Click the Apply button at the top of the window to commit the changes.
- Use the package manager in Kubuntu:
- Open the K menu.
- Choose System
- Choose Adept Manager – Manage Packages
- Use the Fetch Updates button to update the list.
- Browse or search the packages.
- Mark the packages you wish to install or uninstall.
- Click the Apply Changes button at the top of the window to commit the changes.
Use the GUI to browse the most popular packages
You can browse the most popular packages in the package manager by category with Add/Remove in Ubuntu and Kubuntu:
- Browse the most popular packages in Ubuntu:
- Open the main menu
- Choose Add/Remove…
- Browse the most popular packages in Kubuntu:
- Open the K-menu
- Choose Add/Remove Programs
Install a program from a .deb file
When you manually install a .deb file, dependencies are not automatically resolved for you, but you’ll find out what they are so you can install them. Download the .deb file and then install the program from the GUI or from the command line:
- Install the program from the GUI:
- Double-click the file and use the package installer that opens.
- Install the program from the command line:
- Open a terminal window.
- Change to the directory the .deb file is in by typing this command:
- Install the package by typing this command:
cd /path/to/file
sudo dpkg -i packagename.deb
Note: replace packagename with the name of the package.
Install from source (compile)
Before following these instructions, make sure you have the build-essential package installed. This is not installed by default in Kubuntu or Ubuntu.
- To install from source, double-click the file and extract its contents to a directory.
- Open a terminal window and change to the directory you extracted the files into by typing this command:
- Check whether the dependency requirements are met by your system by typing this command:
- Compile the source code by typing this command:
- Install the program by typing this command:
- Remove any temporary files created during the installation process by typing this command:
cd /path/to/directory
./configure
make
sudo make install
clean install
Install from .rpm
Before following these instructions, make sure you have the alien package installed. This is not installed by default in Kubuntu or Ubuntu.
Sometimes you just won’t be able to find a .deb file for a program you’d like to install. You can use alien to install an .rpm file in Kubuntu or Ubuntu, but it will not resolve dependencies, so this method tends to be a bit messy, and isn’t for the faint of heart…
- To install an .rpm file, open a terminal window and change to the directory the file is in by typing this command:
- Install the .rpm file by typing this command, replacing packagename with the name of the package:
cd /path/to/directory
sudo alien packagename.rpm
Get the dependencies of a package
- Type this command in a terminal window, replacing packagename with the name of the package:
-
sudo apt-get build-dep packagename
Create a .deb file from source
Before following these instructions, make sure you have the checkinstall package installed. This is not installed by default in Kubuntu or Ubuntu.
- To create a .deb file from source, double-click the file and extract its contents to a directory.
- Open a terminal window and change to the directory you extracted the files into by typing this command:
- Check whether the dependency requirements are met by your system by typing this command:
- Compile the source code by typing this command:
- Create a .deb file by typing this command:
- Remove any temporary files created during the installation process by typing this command:
cd /path/to/directory
./configure
make
sudo checkinstall -D
clean install
Run a stand-alone binary file
This will run a stand-alone binary file that doesn’t need to be installed. These are often gotten from tarball or zip files.
- Extract the tarball or zip file to a directory.
- Open a terminal window and change to the directory the extracted file is in by typing:
- You can optionally change the permissions of the file to give read and execute access to everyone and also write access to the owner of the file by typing this command:
- Run the file with one of these methods:
- If it’s on the system path:
- If it’s not on the system path:
cd /path/to/file
chmod 755 filename
scriptname
./filename
Uninstall software in Ubuntu
- Uninstall
To uninstall a package and leave its configuration files in place in case you later wish to install it again, open a terminal window and type this command, replacing packagename with the name of the package:
sudo apt-get remove packagename
To uninstall a package and remove all of its configuration files, open a terminal window and type this command, replacing packagename with the name of the package:
sudo apt-get remove --purge packagename
See Also
See also the Psychocats page on installing software in Ubuntu.
Obligatory Happy Ending
And they all lived happily ever after. The end.
