How To: Find Your CPU Information

Today’s article shouldn’t be all that long, as it’s a subject touched on before, as we discuss how to find your CPU information. This will be in the terminal, of course. There are also many ways to find your CPU information. This article will just cover another way that I don’t think we’ve already covered.

I’ve touched on this subject before:

One Way To See CPU Information

In that article, we simply used the ‘cat’ command to read information from a text file. It’s a pretty handy way to find CPU information, but it is not the only way.

You can also get some basic information about your CPU with Screenfetch or Neofetch. I’ve written about those as well:

Screenfetch vs. Neofetch, You Decide!

I’ve even covered ‘lscpu’ in the past. You can read that article here:

A Little About The ‘lscpu’ Command

So, as you can see, there are lots of ways to find out what CPU you’re working with. You can do it graphically, that is in a GUI, if you’d rather. It’s as simple as installing an application called ‘HardInfo’ and you can read more about it here:

Graphically Examine Hardware Info With HardInfo

See? There are all sorts of ways to get information about your CPU. You have all sorts of choices and this article is going to simply detail yet another way to gather this information.

Why? Well, I like to be the kind of person that gives you options. I like that there are so many ways to accomplish a task in Linux.

Why would you want this information? Perhaps you bought a new computer. Then again, you might have paid for a server (virtual or real) and want to confirm that you’re getting what you paid for. You could have multiple devices, such as myself, and not remember what hardware is in each of those devices. 

There are all sorts of reasons why you might want to know your CPU information. There are all sorts of ways to get this information. Today can have a shorter article than we’ve had lately, as we cover this topic yet again.

Find Your CPU Information:

As mentioned in the opening of this article, we’ll be doing this in the terminal. My regular readers will be used to this and will know how to open the terminal. If you don’t know how to open the terminal, you can almost always just press CTRL + ALT + T, and your default terminal will open up. You may otherwise need to open a terminal from your application menu.

With your terminal open, we’ll be using the ‘lshw’ command. You shouldn’t need to install anything. The ‘lshw’ should come pre-installed as it’s a rather basic piece of the common Linux toolbox. If you check the man page (with man lshw), you’ll see that the program is just like many of the other ‘ls* applications, in that it lists hardware. Specifically, it says this:

lshw – list hardware

That’s an accurate enough short description. The actual description says this:

lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines (PowerMac G4 is known to work).

So, the lshw tool is a pretty good tool to have handy when you’re wanting to know information about your hardware. I once botched an article on lshw! I’m sure I’ll botch another one eventually!

Specifically, you simply want to use the command as follows:

You want to run the lshw command with sudo (or as root, if sudo is not available) so that you have the elevated permissions to retrieve full information in the command’s output. If you try to run lshw without elevated permissions, it will remind you that you should do so.

On the man page, you will discover a bug. I’ve yet to see this bug in real life, but there is a bug. The man page explains it like this:

Not all architectures supported by GNU/Linux are fully supported (e.g. CPU detection).

So, that’s something to be aware of. I doubt it’s going to impact (m)any of my readers because we’re almost always using fairly common CPUs. It should correctly identify your CPU.

Closure:

Well, it’s a pretty basic subject and an easy enough command to keep in mind. If you want to find your CPU information, there are a ton of ways to do so and we’ve just covered one more way. This seemed like an easy article to write and I could use an easy day. I think we could all use an easy day once in a while, but the show must go on and you get yet another article for your enjoyment.

I have been making the articles longer. I’m trying to share more information along with the directions. I think it’s good for understanding and it doesn’t take that much more time. If you have an opinion on the matter, please leave a comment.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Update A Single Package In Ubuntu

Today’s article should be short because it’s late in the evening and I have decided to write about how to update a single package in Ubuntu. It’s an easy topic to write about, as there are really just a couple of choices. It shouldn’t be complicated and, for the most part.

First, let me state this…

I firmly believe that you should keep everything updated and updated the minute the update is available.

HOWEVER…

That assumes a perfect world. We do not live in a perfect world. We live in the real world. Because of this, people delay updates for various reasons. The biggest delay I can think of at this hour of the night is the delays added in the business world.

Rather than push an update to production, they’ll run it through testing first. It can take quite a while before an update makes it into production.

The reality is that many of our updates are security updates. As a byproduct of their update policy, at any given time they’re running insecure software. I understand why they’d do this. They don’t want things to break. They certainly don’t want public-facing things to break.

Again, I can understand why regular people follow a similar process. They’ll wait and watch to see if the updates cause problems for other people. But, that’s like waiting for the first person to jump in the river to see if the water is cold.

In all my years of using Linux, I’ve had updates bork the system fewer times than I have fingers on one hand. I’ve had updates bork the system so completely that it hoses everything exactly zero times. As in, not once was I screwed over by an update that really did any damage.

But…

Again, I can understand those who would rather be cautious.

This article is for you. It’s for you people who want to update a single package in Ubuntu. It’s for those people who do what they must in order to maintain a stable system.

This isn’t just applicable to Ubuntu. I tend to use Lubuntu and, as such, am a fan. So, I used Ubuntu in the headline. This applies equally to Debian, Mint, and other Ubuntu derivatives. It should even work in derivatives of derivatives. It’s pretty basic stuff.

Update A Single Package In Ubuntu:

So, you might be able to do this with a GUI. I don’t actually know and I didn’t test to see if there was a way to do so graphically. Check your software manager while the rest of us open a terminal. You can (more often than not) open your default terminal by pressing CTRL + ALT + T.

With your terminal now open, you need an application to update. If you’re a good netizen, you hopefully don’t have many upgrades available. You can check and see by running this command:

You can then get a list of applications that can be updated, assuming there’s an application that can be updated, with the following command:

The next step is to use one of the following two commands to update a single package in Ubuntu (neither of which are all that difficult):

Yes, that looks like it’s going to install a new application, but you substitute the <package_name> with the package name that you want to update in Ubuntu. The ‘install’ will happily upgrade to the next passage.

The next one is bit more jargony. Jargon-y? Maybe? It’s more complicated looking (but easy enough to memorize). So, if you want to update a single package in Ubuntu, this too should also do the trick:

Once again, you replace the obvious with the obvious. Just doing so would help you sort out how to update a single package in Ubuntu. Either of these commands should work, so you do have a choice.

Closure:

As I said, it’s not going to be all that difficult to update a single package in Ubuntu. You have a choice in commands. While I think it’s best to avoid all update delays, I do understand why you might want to be more cautious.

I go full blast at updates, but I’ve lately been a bit slow about major upgrades. In my case it’s a bandwidth issue. I had one box running like Linux Mint 20 or something like that…

Wait, it still says 21 is the version – but I’m quite literally nearing the end of the upgrade process. That may have already changed. I was so far behind that I needed more than 4 GB worth of downloads. When I’m done we’ll have an OS that’s missing almost all the stuff I installed on top of it! 

It can sure be a pain in the butt. Alas, as least I’m not trying to update a single package in Ubuntu!

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Temporarily Set A Static IP Address

Today we’ll have a fairly simple article that may not generate much interest as we’re just learning how to temporarily set a static IP address. This isn’t all that difficult, as I’ll just show you the syntax, but it’s something you might find worth knowing. So, if you’re interested in learning how to temporarily set a static IP address, read on!

What is an IP address?

If you have to ask that question, this article isn’t one that you need to try. You can, it’s just usually something reserved for specific circumstances.

Every networked computer is assigned a numerical IP address. You may have more than one address, including a public and a private IP address. It’s possible to have an IP address on multiple network interfaces, but every connected computer has an IP address. That’s what we use for the web – you just don’t see it as we use domain names that get resolved to IP addresses.

Some links you should read:

How To: Find Your IP Address Through Your Terminal
Find Your Network Interface Name
A Couple More Ways To Find Your Network Interfaces

Those articles aren’t all on the same subject, but they’re articles where I discuss things like IP addresses and DNS. If you’re new to this, you should read the first link, about how to find your IP address. 

The IP address we’re concerned with is our private IP address. This is different than our public IP address and is used on your local network. It’s the address your router sends data, for example. If you remotely control devices on your network, that IP address is what goes on behind the scenes as it denotes the device.

Each private IP address will almost certainly resolve to just one device. This is not true everywhere. One IP address can have many websites and some ISPs are doing IP address subnets for public IP addresses because they’ve run out of IPv4 IP addresses. You needn’t concern yourself with that and that’s just for some random information.

So, the IP address we’ll be setting as a static IP address will be your internal, that is private, IP address. I sometimes do this when I don’t want to have to hunt around for an IP address and device.local isn’t working.

This will only be a temporary change. When you reboot your computer, you may have an entirely different IP address. I don’t want to add complexity, but some routers may already assign a device the same IP address every time it sees it. While this isn’t a static IP address per se, it’s effectively the same.

We’ll be setting that private IP address locally, establishing it on the computer itself. Any modern router should handle the change just fine. However, this may prove problematic for those who have equipment that strays from normal behavior. If that’s the case for you, either reboot or just change your IP address back to what it was originally and everything should be good. However, I can’t see this being a problem, because your original IP address will still work just fine.

Got all that figured out? Well, good! Let’s jump into the article!

Temporarily Set A Static IP Address:

Yes, you’re going to need an open terminal for this. There might be a way to do this with a GUI, but I’ve never tried it. Route around in your network manager and there might be a way. Specifically, check for DHCP and see if there’s a way to change that to a manually configured IP address. It might be the ticket. I’m seeing something similar to that in my network manager, but I haven’t tested it.

Anyhow, as you’re going to need an open terminal, you can probably just press CTRL + ALT + T to open your default terminal. If that doesn’t work, just open it from the application menu. You’ll probably find a terminal application listed under your administration (or system) tools. That’s a good spot to start looking.

With your terminal now open, we need to find the name of your network interface. I shared a link in the opening section, but the command is just this (assuming you’re using a modern distro):

Your network interface names will look something like enp2s0 (for an ethernet/wired connection) or maybe something like wlxe4beed0e5f5c for a wireless network interface. You can assume ‘en’ is ethernet and ‘we’ is wireless. That seems to be fairly consistent. 

Now, while you’re there, you need to determine your IP address, specifically your private IP address. This may look something like this:

That’s the number you’re going to change.

NOTE: Unless otherwise noted, you want to stick to Class C private network addresses. These are addresses reserved for your private networking and are 192.168.0.0 to 192.168.255.255.

So, let’s say your private IP address is indeed 192.168.1.4 and you want to change it to 192.168.1.42 (because 42 is indeed the answer). You can do that. The syntax needed to temporarily set a static IP address is as follows:

So, it’d look like this:

Next, you verify that it worked:

What this does is it adds a static IP address. Your original IP address will still work, but you’ll have designated and set a static IP address that will also work.

You can add all sorts of static IP addresses by this means. If you run the ip addr command again, you’ll see that the static IP address has been added under the fixroute <network_interface_name> heading.

For example, see this image:

setting a static ip address
Any and all of those private IP addresses will now work and remain static.

You can just reset it to the same original IP address but you shouldn’t need to. This shouldn’t break anything because the original IP address remains the same and remains usable. You can connect to that computer with any one of those private IP addresses, each of them a static IP address.

It’s possible to make this change a permanent thing, which might make an interesting future article. I don’t think anyone will find it complicated. These things are easier to do than they are to explain. I spent more time with the verbiage than anything else. It’s hard to include all that you need to know because I don’t know what you know. 

Closure:

Well, there’s another article. If you’ve ever wondered how to set a static IP address, this is the answer. It’s not complicated. Anyone should be able to figure it out, using the syntax above. I hope that I’ve made it clear. Sometimes it’s not all that easy to explain stuff in plain English without going too deep.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Some Opinions (News?) About Purism.

Today’s article isn’t like a regular article, it’s just some news about Purism. There’s not going to be much written about this company by me, as I’m not wanting to get sued by angry people. I’m mostly going to give you some information and then share a video. With that information, you’ll be free to make your own choices.

Let’s start with the basics…

I have been paying a little bit of attention to Purism for quite some time. I have considered giving them money, but there were already enough complaints that I never felt comfortable doing that.

Purism SPC, the company, is located in San Francisco, California. They have been around since 2014 and they sell products that are based on ‘opensource’, hardware such as laptops and phones.

Their site can be found at https://puri.sm/

Purism claim to be interested in protecting your privacy and liberties, by using open-source software. There are lots of thoughts about this.

I have seen a few people mention this company lately, as though they were interested in their products. I feel an obligation to inform, thus this news article about Purism.

I will not be offering my opinions on the matter. As much as free speech exists in my country, I don’t really feel like spending money on legal fees and I don’t want to deal with a cease-and-desist notice that tells me to take the site down.

What I am going to do is share a video with you.

Warning, this video uses adult language – but provides sources for their claims. I would suggest watching this video if you’re interested in Purism products.

Now, you take that information and do with it what you will. You can view a bunch of old/current complaints at the Purism Subreddit. There are also a number of topics over on HackerNews but I don’t have links to those. I’m not trying to do an expose, I’m trying to help people make wise choices. This means doing your research – and real research.

Closure:

My opinions are my own, though I’m sure it’s okay to say that I do not now own any Purism products and I do not intend to buy any in the near future. This is simply one of many videos, articles, and comment chains that finally made me realize that I should probably share this with others – as we don’t all dive deep into things prior to making a purchase decision.

What you do with this information is up to you.

I will further suggest that any comments on this matter should be left here. It’s well known that I share my articles elsewhere but I don’t know if Purism is lawsuit happy and I don’t think I’d like to put other sites at risk. I’m sure it’s fine, but we’ll see…

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Extract Files From .DEB Files

Today we’ll be discussing a rather simple subject, limited to just the curious and tinkerers, about how you extract files from .deb files. The folks who want to know this information will likely be the intellectually curious or those who are doing so for scholarly, academic approaches. Then, of course, the folks who like to tinker might also be curious.

Let’s get this out of the way first…

The .deb file extension is also a format of the files. These files are software packages, handled by dpkg I suppose, and valuable only for those systems that are based on Debian (though I’m sure there’s an exception out there, it won’t be with a popular distro).

You see and use these files quite often if you’re using a distro based on Debian. Some examples of distros derived from Debian would be Ubuntu (and the Ubuntu family of official flavors), Linux Mint, elementaryOS, and a whole lot more. If you’re using ‘apt’ or ‘dpkg’ in the terminal, you’re almost certainly using a Debian derivative.

This means that this article isn’t appropriate for everyone. If you’re using a distro with a different package manager, this article won’t apply to you. Should you want me to cover that distro and think it’d make a good article, you can contact me. If you’re unfamiliar with Debian and its derivatives, you can read this Wikipedia page about the .deb file format.

The tool we’ll use to extract files from .deb files is known as ‘ar’ and should be installed by default. Any distro using .deb files, unless it’s a very stripped-down version, will contain the ar application. If you check the man page (man ar), the naming section should indicate that it’s a suitable application for this task. More specifically, it says:

ar – create, modify, and extract from archives

If you check the actual description on the man page, it says this:

The GNU ar program creates, modifies, and extracts from archives. An archive is a single file holding a collection of other files in a structure that makes it possible to retrieve the original individual files (called members of the archive).

So, we have the right tool for the job. It’s a pretty useful tool that doesn’t get used all that much. The chance to introduce it to some new people is quite a privilege and I appreciate all of you who read this blog.

By the way, it has come to my attention (thanks to WizardFromOz from Linux.org’s forums) that you’ll not have ar installed by default. You’ll need to install it. Seeing as we know you’re using this package manager, you can install it by installing binutils. The command to do so is:

Speaking of this blog, I’ve been getting a great deal of ‘blog comment spam’. Automated attempts are pretty well locked down and prevented, so this means that people are doing this manually. They’re possibly even solving reCAPTCHA to do this and this is entirely a waste of time. It takes me mere seconds to deny the comments and the comments are never published.

I only publish comments that are acceptable (and I’ve even published some derogatory comments, just because I didn’t want to censor someone’s opinion – but I will censor spam). So, they’re not getting any return on their time and labor. Removing them annoys me. I get so few comments that I could almost justify disabling them entirely, but I want folks to be able to discuss any of my articles – and to correct me when I’m wrong or when I omit something important.

Anyhow, enough of that… Let’s just get into the article itself…

Extract Files From .deb Files:

Yes, we’ll be using the terminal. If you do not want to use the terminal, this is quite easy to do in the GUI. Simply open up your file manager, navigate to where you’ve stored the .deb file, right-click on the file, and choose to extract the files. You can also choose to open the file with your GUI archive manager and then extract just the files you want to extract. It’s pretty simple!

Now, for those of us who want to do this in the terminal, just press CTRL + ALT + T, and your default terminal should open. Not every distro has this keyboard shortcut as a default, and that’s just horrible. It really should be universal and your distro (should this shortcut not already work) will likely have a way to map those keys to open a terminal. 

With your terminal now open, navigate to where you’ve downloaded a .deb file. If you do not have a .deb to play with, you can do this:

With your existing .deb file, or with your freshly downloaded .deb file, we can now extract files from .deb files. The command would look similar to this:

If you use the v flag (notice the lack of the - part of the flag) then it’ll be verbose – meaning it will tell you the output. If you don’t need the output, you can skip it, just know that each .deb file should contain three files and that these three files should all be consistently named.

Should we put this all together, your command would look something like this:

Or, if it’s in a folder of its own, without any other .deb files, you can cheat and just use a wildcard – like this:

The output of that command would look something like this:

And, if you navigate to the directory with your GUI file manager, you should see something that looks quite similar to this:

the results if you extract the files from the Google Chrome .deb
Assuming the .deb follows standards, it’ll look just like that, regardless of the application.

This should be consistent across all the various .deb files you extract. They’ll contain those two additional compressed files and a ‘debian-binary’ file. If you’re interested in what’s inside those ‘tar.xz’ files, you’ll have to use a search engine or wait for another article, because that’s more than I am going to get into.

I may still write a full article, but the way to extract those ‘tar.xz’ files is to do it like this:

I trust you can figure it out from there. It’s a bit different from how you extract files from a .tar.gz file. So, it should maybe get an article all its own. This tiny bit of information won’t get indexed properly, so a whole article will make it easier to find and follow. 

Closure:

Well, this appears to be another long article. It doesn’t take all that much more time to write articles of this length. I’m kind of doing this as an experiment. I am interested in seeing how Google reacts to these longer articles, with more information and with more code and pictures as examples. I’m being optimistic because I don’t mind making the articles longer. 

I have a ‘secret weapon’ I’ve been using since January of this year. That makes it much easier. I plan on doing an article about said secret weapon at some point, but I need to get my ducks in a row first. I hope it’ll be interesting and I’ll likely publish it on a day off so that it doesn’t stop the flow of regular articles. (The spice must flow!)

As always…

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.