If you’re new to Chrome OS or maybe you’re just learning your way around the recent addition of Linux apps, you may have found yourself a bit overwhelmed with it all. You’ve probably spent precious time searching the web to figure out which Linux apps are available via your shiny, new Linux terminal. Speaking of the terminal, it’s completely understandable if you’ve slammed your Chromebook shut after a few hours of trying to grasp the Linux lingo and how to use the command line interface. Well, that’s why we’re here. The Command Line series was created to explore Linux on Chrome OS and help you make the most out of your device. We aim to demystify the newly found operating system inside your operating system.
Today, we’re going to take a look a three different methods for installing applications, or packages in the Linux container on Chrome OS. If you’ve downloaded a .deb file from a trusted source, most often you can simply double-click the file and the Linux installer will take over and install the package for you. However, learning your way around the terminal and the various methods by which you can install Linux packages can be very useful for a number of reasons. First, many of the packages regularly used in Linux are available directly from the Debian 10 (Buster) repository and you can download and install them from the terminal with a single command. Second and equally as useful, some command line tools will handle installing dependencies that don’t come along for the ride when you install a Linux package. Later, we’ll explore various package managers and building apps from the source. For now, let’s just look at these three terminal commands.
dpkg (Debian Package) is the base package management system that is built into the Debian operating system. If you have a locally saved .deb package, you can use
dpkg to install it.
dpkg has some other functions but we’ll cover those in another article. To install a .deb package with
dpkg, open up your Linux terminal to get started. The basic installation command is
dpkg -i some.deb. and you will replace the some.deb with the exact file name that you are installing. This only works for local files and you will need to specify the path to the file. If you move your .deb package to the Linux folder in the Chrome OS files app, you don’t have to edit the command in any way. While dpkg is a sure-fire way to install locally stored packages, it’s not the go-to method for most Linux users. The more common tool for installation is APT.
APT is exactly what it stands for, Advanced Package Tool. It is a tool that builds on the
dpkg package management system. Unlike
dpkg, APT has the ability to fetch .deb packages from whatever repositories are present in your Linux OS. For Chromebooks, the repo is Buster Main and Google’s in-house repository specifically for Chrome OS. When you use APT, your requested packaged will be downloaded and installed in once action. Using APT in the Chrome OS Linux terminal also requires super user permissions. Therefore, it is used with the
sudo command. For this example, we’ll install a random game I found called Blob and Conquer. You would install this package using APT with the following command. Once installed, you can launch the app by typing the package name in the terminal and hitting enter or finding the app icon in your app launcher.
sudo apt install blobandconquer
To install from the repository, you will need to know exactly how the package is named in the repo. To find the full list of packages available in Debian Buster, you can check out the official list here. APT can also install local packages with same command. Instead of the app name, you would use the filename just like we did with
dpkg. If you have a .deb file in you Linux folder, simply use the following command to install it but replace the last part with the actual filename to include the .deb extension.
sudo apt install ./some.deb
Last but not least, we have GDebi. This tool isn’t built into the Debian container on Chrome OS but you can install it directly from the repository using the APT command we just discussed. GDebi is another tool that can be used to install locally saved .deb files. That advantage to using GDebi instead of dpkg or APT for local files is that GDepi will ping the repository and pull down any necessary dependencies needed to install the locally saved .dep package. There are a lot of packages that require additional downloads to work properly and this tool will ensure you have all the right pieces to install your application. You can install GDebi with the following command.
sudo apt install gdebi
GDebi does come with a user interface that can be launched from your Chrome OS app drawer but I have found it to be unreliable on my device. Instead, you can use GDebi from the terminal in combination with the
sudo command. Once you have a .deb file downloaded and moved to your Linux folder, you can install it and any dependencies using GDebi with the following command. Make sure to replace the last portion with the actual filename.
sudo gdebi somepackage.deb
So, there you go. You’re now on your way to mastering three more tools in your Linux arsenal. Check back tomorrow when we will cover two very different package managers that can make installing packages a breeze. We’d love to hear from you. If you’re exploring Linux apps on Chrome OS, what obstacles have you run into? What tips would help you feel more confident inside the terminal? Drop a comment or shoot us an email and we’ll get it on the “how-to” list. Stay tuned. There’s more Command Line headed your way.