How To: Update Ubuntu From The Terminal

It’s possible, even easy, to update Ubuntu from the terminal. Personally, I almost always update from the terminal, regardless of distro. This article will tell you how to update Ubuntu from the terminal – but it’s equally valid for Debian, official Ubuntu flavors like Lubuntu or Kubuntu, and it’s also valid for distros based on Ubuntu or Debian – such as Mint.

I recently did an article about updating Fedora from the terminal. Boy howdy, I hope that link works! It’s scheduled for publication so it doesn’t show me the real URL that it’ll have when it has been published! So, I hope I typed it properly! Either way, I recently did said article and figured I might as well do one for Ubuntu.

The tool we’ll be using is known as ‘APT‘ and apt has been a staple of Linux since Debian introduced it in the late nineties. It’s known as “Advanced Package Tool” and is used to configure and install applications. Even if you’re doing it graphically, it’s usually apt under the hood when you’re using Debian, Ubuntu, Mint, etc…

There really isn’t a whole lot to this, so it should be a reasonably short article. It’s also an article that may make the terminal more approachable for people who are new to Linux. Once you see how easy it is, you might decide to try it yourself! If it goes well, you might learn more about the terminal and the many ways you can use it. We can find out!

Update Ubuntu From The Terminal:

This article requires an open terminal, like oh so many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should pop open.

Once you have your terminal open, you’re going to update your database of available software and the version numbers of said software. This database will be checked against the database of software (and versions) that you have already installed. It’s just a simple command:

That’ll let you know if there’s any software that needs to be updated and may take a few seconds to complete. If any software is available it will let you know and you can upgrade to the newest version. The notification will look something like:

You can, as stated, see which applications need to be upgraded to new versions by running that command. This upgrade process may also add or remove system software as needed. But, to upgrade, it’s just as easy:

This will spit out a list of software that will be updated, will be added, or should be removed – and you can enter “Y” to agree to the upgrades before pressing ENTER to continue. That’s it, you’re done.

However, I like to alias (an article still not written should link here) all this to a single command. My actual command looks like this:

That will update the database and make sure it completes successfully. It will then upgrade the software, effectively entering the Y for you. Finally, it will automatically remove software that’s no longer needed. Some folks might consider that command a bit risky to run automatically, but I’ve been doing it for years. Use it at your own risk!

Closure:

That’s it, actually. There’s really not that much more I can tell you about how to update Ubuntu from the terminal. Sure, there are other apt commands, but those aren’t really important for this article. Unlike the Fedora article, there’s no handy way to undo an upgrade with apt.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Smash a button!
[Total: 4 Average: 5]

How To: Update From The Terminal In Fedora

It may seem silly to write an article about how to update from the terminal in Fedora, but it’s not! There’s actually a reason for doing this and there’s more to it than just updating! I’ll try to keep the article brief, but we’ll just have to hope for the best.

If you don’t know what Fedora is, it’s a distro primarily sponsored by Red Hat. In 2003, RHL was nixed in favor of RHEL, a paid distro. Fedora is a community maintained distro based on RHEL and even the trademark is owned by Red Hat. 

So, it’s a pretty solid distro with a few versions. There’s a workstation, IoT, and server edition. It’s binary compatible with RHEL and is widely used, with something like 1.2 million users. Support is through the community, which is a distinction between Fedora and RHEL where support is a paid option. Fedora also has some community spins that offer things like different desktop environments.

I should probably note that, since the changes to CentOS’s direction, RHEL is pretty much free for SOHO use. You can download it and use it on your workstation right now. See this link for more information about getting and using RHEL free – it’s a lot nicer an agreement than you may think!

Anyhow, on to Fedora… 

The motivation behind this article is that there’s an ‘undo’ option for DNF that’s pretty neat. However, out of the box it doesn’t do much. There are some extra steps you’re going to want to take and none of the sites that I’ve visited ever seem to put these two together.

This article aims to address that!

Update From The Terminal In Fedora:

Obviously, you’re going to need your terminal open. To do this, you can just use your keyboard and press CTRL + ALT + T. That should open your default terminal.

Once your terminal is open, you can upgrade like so:

That should update your system to the latest and greatest. In fact, you can list your previous DNF history with the following command:

Now, here’s the neat part… When you run the history command above, the first column is an ID column and you can undo a specific update with this command:

Except that pretty much never works. Fedora isn’t in the habit of keeping archived versions in their repositories. So, this is the neat part, you need to add a repo that contains those archives. That’s the missing step!

This isn’t a perfect undo, but it’s a far sight better than it is without that repo being added. For the most part, it works. If it’s not working, it may ask you to use either (or both) the --allow-erasing or --skip-broken flags and, from my testing, that appears to make it work well enough most of the time.

So, if you want to use the undo feature offered by DNF, you should really add that archive. Doing so will make a more robust solution when you attempt to update from the terminal in Fedora.

Closure:

And there you have it. With that, you should be able to update from the terminal in Fedora with some greater confidence. With that little change, you can actually undo (some/many) updates if they go awry or if you need a little more time before you can use the newer versions of your applications. It’s not that hard and my observations tell me that it works with some regularity – if you’ve added the archive repo.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment

Smash a button!
[Total: 2 Average: 5]

The State of Linux-Tips.us, a Meta Post

Wait a minute… There was an article yesterday! There shouldn’t be an article today! Indeed, there shouldn’t. This is a meta post, letting folks know the state of the site.

Linux-Tips is a personal project, though one I encourage folks to join. The goal has been, and will continue to be, to write an article every other day. I figure that I’ll do this for a year and see where things are at before deciding if I should keep it up.

The feedback has been awesome. The participation is not much but it’s actually better than I’d expected – especially considering how new the site is and how little promotion I do. Most of the feedback seems to be at the sites where I link this site, and not here on this site. It is what it is…

Speaking of which, if you want to help you could help by sharing the articles on social media. It’s just a few minutes every other day! I should also point out that each article is published with a permissive license. You can use ’em for anything you want, with attribution.

I think things are coming along just nicely. I increased the available bandwidth due to some hammering on the server, but that didn’t happen last month. I’m okay with that. I’d prefer a steady growth. It’s less pressure, I think. I figure I’ll share the meta information with you now and again. I’m not sure how often I’ll do this.

So, how about some meta?

By the time you read this, there should be 39 articles published. That’s keeping with my schedule. I still have tons of notes, old articles on the old site, and ideas for articles. Don’t let that stop you from making suggestions or writing the article yourself!

The stats are all over the place. Every analytics software does it differently. There’s Google’s Analytics that doesn’t count anyone blocking ads, and Awstats that counts everything under the sun. We only used about 4 GB of traffic this month but we did average ~140 unique visitors per day.

Most of June’s referred traffic came from Reddit. This was followed by Linux.org. Only a small amount of traffic comes from search engines (so far), and most of that was from Google. Perhaps due to some SEO efforts, some of the articles rank fairly well at Google.

Not a whole lot of people are signed up for the newsletter. You should sign up for that! I promise, there won’t be any spam. There may also come a time when I stop sharing the links at the various sites, and this will be your way to keep up with when new articles are published.

In June, 688 people visited my article about will your hardware work with Linux. Most of those visitors came from r/linux on Reddit. The page counter is horrible and I should probably disable it. I have more accurate stats from the server itself.

More Info!

Site-wise, I’ve invested about 250 hours according to a plugin that monitors this stuff. Sadly, I didn’t install the plugin at first, so that doesn’t include most of the time I spent building the site’s architecture.

I did remove the adblock nag. I figured that was just annoying people. Alas, nobody clicks on the ads and Google prohibits asking people to do so. They’re pretty strict about the rules. So far, there has been a single donation. To them, I say thanks! The site will (almost certainly) stay up and running even without donations. You can help cover the server expenses if you want. If not, I’ll just cover the costs. I ain’t scared!

I dare say the site is feature-complete. Everything is running as it should. The site updates itself. It backs itself up both locally and remotely, each with duplication for a truly robust backup strategy. It does this daily, so the odds of losing much data are pretty low. If you can think of a feature you want, let me know.

The site’s security is quite robust. There have been no breaches as far as I know. Then again, I don’t ask for much in the way of personal information. I figure if I don’t collect your information then I’m not obligated to protect it. Still, everything is reasonably secure, using multiple layers of defense that I’ll avoid detailing here.

Closure:

And, I guess that’s it. That’s the state of things at Linux-Tips.us. That’s about all the meta I can come up with. Things are going fine and I look forward to saying the same thing a month from now, though some more activity would be nice. I guess I’ll include my standard closure text…

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Smash a button!
[Total: 2 Average: 4.5]