Sometimes I want to install a program when offline. But
apt-get downloads as you install.
Is there a way to install a program, like you would install a
.exe, on Ubuntu?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You can use:
apt-get install -d
To download software and dependencies without installing them. The .deb files (pretty much equivalent to Windows .exe installers), are then downloaded to
Unless you've issued
apt-get clean pretty much anything you've ever installed via apt-get should have the .deb files stored there.
Also you can install the .deb files via
dpgk -i but you have to remember to install the dependencies (and their dependencies and so on), first. Or you should also just be able to double click a .deb file in your file browser and Software Center should take care of it for you.
For example: I want to install
gedit (which is included with Ubuntu normally so it won't download tons of dependency .deb files). But I have a system that, for whatever reason, doesn't have gedit and has no internet connect.
So first, on a computer connected to the internet, I run
apt-get install --reinstall -d gedit (because if you try running
apt-get install -d gedit on a system with gedit already installed to the latest version it just tells you it is already installed), which then goes through the normal process of downloading the package (in this case there are no dependencies), and then stops.
Then I locate the file under
... and move it to the computer which needs gedit installed and install it, in this case using the Software Center.
Or I could install it using
cd /var/cache/apt/archives and
dpkg -i gedit_3.10.4-0ubuntu4_amd64.deb