I noticed a fair number of commenters on my last post, “Why I use a Chromebook”, use the Linux on a Chromebook feature. More than expected, to be honest. I’ll bet only a few, if any, of them have stopped using
apt, or the Advanced Package Tool, command to install Linux apps. I have. I now use Nala for Linux, which is a front-end for the apt package manager command.
How to install Nala for Linux on a Chromebook
Normally, when someone refers to “a front-end”, people think of graphical user interfaces or GUIs. But apt is a Terminal command. So too is Nala.
However, it makes the installation of Linux apps nicer to look at, provides more useful information, and adds more features. Not only that, but it can download Linux packages quicker than apt and it provides a history of updates and installations. You can even revert actions from history.
Installation of Nala using Linux on Chromebooks is fairly simple. The instructions are here and I did the steps under the “Install the repository and key” section, followed by running this command in Linux on my Chromebook:
sudo apt update && sudo apt install nala-legacy
Don’t be worried about the inclusion of the word “legacy” in that command. It’s a version that will work with the Debian version of Linux on a Chromebook. Once the installation is complete, I suspect that will be the very last time you ever run the
apt command. Moving forward, you’ll use Nala in its place.
To illustrate the differences, here are two Linux instances running on the same Chromebook. I’m going to use apt in one to install Node and the Node Package Manager as an example. And I’ll use Nala in the other to install the exact same Linux packages on my Chromebook.
App installation comparison between apt and Nala
Here’s what running the
sudo apt install nodejs package looks like using apt. I first run the
apt command and see what packages will be installed.
I type the letter Y and all of the packages for Node are downloaded and installed in Linux on my Chromebook.
If you’ve ever installed a Linux app, this should be very familiar. And it works well. But, that doesn’t mean it provides the best experience and information.
Let’s take a look at Nala to compare.
Here I’m running the Nala installation command for the same Node package. You can immediately see the difference.
Instead of line after line of information, Nala cleans up the interface in an intuitive way.
And it gets better. You can’t see the part where I’m asked if I want to install Node but it’s the same prompt that apt provides. It should be since Nala uses apt on the back-end. This is what I see after typing the letter “Y” to proceed:
Now you see the installation step by step with a much nicer progress bar for every download and installation action.
OK, you’re saying, it looks nicer. So what? Remember when I said Nala adds simple, useful features atop apt? Let me share two of the most useful ones.
A useful history and faster downloads with Nala for Linux
First, I can easily view a full history of my installations for Linux on a Chromebook.
nala history to see your prior installation activities:
And you can see the history of each installation activity. Above, I ran the
nala history info 2 command to view the details of ID number 2 in my history, for example.
Finally, you can undo (essentially remove) or redo any Linux installations with the history.
Here’s what it looks like when I told Nala to undo the Node Package Manager install, which was ID number 2.
Yes, you can do these things with apt commands. But I like Nala’s presentation of the information much better.
Speaking of much better: I said that Nala can download Linux packages faster than apt can. That’s for two reasons. First, Nala supports parallel downloads so it can pull multiple files down at the same time. And second: It has a nifty feature that tests the fastest download sites, or mirrors.
Here I ran through the “fetch” command to test and configure my mirrors. Since I’m in eastern Pennsylvania, I’m not surprised to see servers in New York and my home state show the fastest results:
I chose the first three mirrors at the prompt and Nala asked if I wanted to add those to my list of repositories. I said yes and Nala did the rest. Now my downloads for Linux installations will be faster and customized to where I’m located.
I didn’t have to manually add those repositories to Linux on a Chromebook with any archaic commands or by editing a text file. It’s done.
Again, there’s nothing wrong with using the plain ol’ apt command. Millions of people running a Linux distro that support it do use it every day.
But you’re using Linux on a Chromebook! Chromebooks are supposed to be simple, secure, and speedy. Nala brings those same attributes to the Linux app install experience on a Chromebook, so for me, it’s good-bye apt!