Install Software
Table of Contents
- Install software from the command line
- Install software from a .deb file
- Install software from the GUI
- Install software from .rpm
- Install software from source (compile)
- List the dependencies of a package
- Make a .deb file from source
- Run a stand-alone binary file
- Uninstall software in Ubuntu
- See Also
- Obligatory Happy Ending
Install software from the command line
-
Let your package manager know what’s installed and what’s available in the repositories by opening a terminal window and typing:
sudo apt-get update
-
Download the package and its dependencies and install them by typing this command:
sudo apt-get install foo
-
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 install foo1 foo2 foo3
Install software 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:
- Use the GUI:
- Double-click the file and use the package installer that opens.
- Use the command line:
- Open a terminal window.
-
Change to the directory the .deb file is in by typing this command:
cd /path/to/file
-
Install the package by typing this command, replacing packagename with the name of the package:
sudo dpkg -i packagename.deb
Install software from the GUI
- Open the K menu.
- Choose System
- Choose Muon Package Manager
- Use the Check for 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.
Install software from .rpm
Before following these instructions, make sure the alien package is installed. This is not installed by default in Kubuntu. Use the command line or GUI to install it.
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:
cd /path/to/directory
-
Install the .rpm file by typing this command, replacing packagename with the name of the package:
sudo alien packagename.rpm
Install software from source (compile)
Before following these instructions, make sure you have the build-essential package installed. This is not installed by default in Kubuntu. Use the command line or GUI to install it.
- 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:
cd /path/to/directory
-
Check whether the dependency requirements are met by your system by typing this command:
./configure
-
Compile the source code by typing this command:
make
-
Install the program by typing this command:
sudo make install
-
Remove any temporary files created during the installation process by typing this command:
clean install
List 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
Make 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. Use the command line or GUI to install it.
- 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:
cd /path/to/directory
-
Check whether the dependency requirements are met by your system by typing this command:
./configure
-
Compile the source code by typing this command:
make
-
Create a .deb file by typing this command:
sudo checkinstall -D
-
Remove any temporary files created during the installation process by typing this command:
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:
cd /path/to/file
-
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:
chmod 755 filename
-
Run the file with one of these methods:
-
If it’s on the system path:
scriptname
-
If it’s not on the system path:
./filename
-
If it’s on the system path:
Uninstall software
-
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
-
Complete uninstall:
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.
Comment: