View Detailed Hardware Information

There are many tools for showing your hardware information and today we’ll get to view detailed hardware information. This is going to work in a variety of distros, so you probably won’t be left out.

We’ve covered many ways to view hardware information, be it all of the hardware or just some particulars. For example:

How To: Find Your CPU Information
Show RAM Information With Ramfetch
Let’s Install INXI
Find Your Graphics Card Information
Gather Storage Disk Information With ‘smartctl’

The list goes on and on and on… After all, knowing about your hardware is an important step in a lot of your activities. If you don’t know what you have for hardware, you’re quite limited in the steps you can take. You need to know that your system supports 64-bit to install some distros, for example.

So, today we’re going to examine another way of learning about your hardware. We’ll be doing this in the terminal and we’ll be doing it with a tool known as ‘hwinfo’. It’s a handy application that’s available nearly universally.

hwinfo:

You’ll find that hwinfo is a terminal-based (CLI) tool. If you look at the title of the application you can surmise its function – and it’s very much fit for function.

We’ll get to installing hwinfo, but you can see hwinfo is already installed with the following terminal command:

If it is installed, the output should look like this:

If it’s not installed, we’ll get to that in the next section.

Once installed, you can check the man page with this command:

There, you’ll see that hwinfo is fit for purpose. It’s described as:

hwinfo – probe for hardware

There’s also this blurb:

hwinfo is used to probe for the hardware present in the system. It can be used to generate a system overview log which can be later used for support.

So, you can see that this is indeed a good tool for showing detailed hardware information in the terminal. There are other such tools, but we’ll just be covering hwinfo in this article. There will be other articles and have been other articles. This is one of those subjects you’ll see more than once because there’s always more than one way to learn about your hardware.

View Detailed Hardware Information:

I mentioned that this is a terminal-based application. There are GUI tools but this is not one of them. Most of you can open a terminal by pressing CTRL + ALT + T. Others may need to find a terminal option in their application menu.

With your terminal open, you can install hwinfo easily.

Debian/Ubuntu/etc:

Arch/Manjaro/etc:

RHEL/Fedora/etc:

Gentoo/etc:

SUSE/OpenSUSE/etc:

Once you’re done with installing hwinfo, you can ‘just run it’ like so:

As you can see, that’s rather overwhelming. You could use grep, but there are many flags you can use to make this information more useful. If you check the man page (with man hwinfo) you’ll see this:

all, arch, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn, joystick, keyboard, memory, mmc-ctrl, modem, monitor, mouse, netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, redasd, reallyall, scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, uml, usb, usb-ctrl, vbe, wlan, xen, zip

Those are all the available flags. The syntax is simple:

So,  you could run this command to learn about your CPU:

The output from that is still more information than most folks are going to want. That information is there for those who need it. For everyone else, there’s the --short flag. That works like this:

In the case of the CPU, the command would look like this:

You can quickly get a list of all the flags (as you may not remember them all) with the following command:

Note that this is different from the --all flag which will display everything.

Closure:

Well, there you have it… You now know how to view detailed (and less detailed) hardware information, you get a choice with hwinfo. You can view detailed hardware information or you can use the flag to show just a summary. Use hwinfo according to your needs and enjoy it!

This seemed like a fine article to write. It’s a pretty basic application but it does have some useful output. It’s worth installing hwinfo just for when you need it, rather than waiting for when you need it and installing it then. That way the tool is read and waiting for you and one less step when you need support or trying to resolve a bug on your own.

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.

Seeing as you’re here, why not visit our friends at Blunix?

“Blunix GmbH offers Debian and Ubuntu focussed Linux Emergency Support 24/7, Project-based Linux Consulting, FOSS-based Managed Hosting on your company IaaS provider account as well as custom Training and Workshops. We prioritize fair business partnerships and employee quality of life over profit. We focus on reasonable security by default and encourage your employees and developers to keep things secure enough to avoid 99% of security issues with automated attack vectors. We focus exclusively on this and do partner with other companies to refer customers that do not fit exactly what we do, or where we require additional help (for example we have a security-focused company that we partner with for higher risk factor hosting setups).”

Click to visit Blunix GmbH

How To: Install Wine In Lubuntu

Today’s article isn’t going to be complicated or long as we are going to cover how you install Wine in Lubuntu. This should be straightforward and work with any modern version of Lubuntu.

I suppose we should start with the basics…

Lubuntu is a distro in the Ubuntu family. This is my favorite distro and I’ve covered Lubuntu-specifics in the past. However, these directions are going to work just fine on Ubuntu or even Linux Mint. They should also work just fine for Debian and any other distro that uses ‘apt‘ and some standard repositories. 

Wine is software used to run Windows software on Linux. It once stood for “Wine Is Not an Emulator” and it is indeed not an emulator. Wine is a compatibility layer that lets you run some Windows software on Linux. Not all Windows applications will run, and things like Windows drivers don’t work, but it can be a handy application for those who still rely on Windows software.

I’ll only cover the basics. There’s a lot to Wine (not WINE, at least according to the project page) and this is only going to cover how to install Wine in Lubuntu. Of course, other distros can use these same few steps, but I only tested in Lubuntu. (It’s a giant amount of software to download and my bandwidth isn’t the greatest.)

If you’ve tested this in other distros, let us know!

And, yes, I did test this in Lubuntu and Wine appears to be installed.

Install Wine In Lubuntu:

You can likely do this with the GUI software installation tools but we’ll do this in the terminal. As you’re using Lubuntu, you can open a terminal by simply pressing CTRL + ALT + T on your keyboard.

Because you’re using Lubuntu, I can surmise that you’re using 64-bit. If you’re not, you’re using a very old version of Lubuntu. You should upgrade to a supported release immediately, or move to a distro that’s still supporting 32-bit hardware.

If you’re not using Lubuntu, you should read this:

Is My System Capable of 32 or 64-Bit Linux?

You’ll need to use a 64-bit CPU and operating system if you want to follow these directions with any hope of success.

The first thing we will do is enable 32-bit software from the repositories. This is just a simple command:

I don’t always remember to suggest you update your device, but it’s a good idea if you update now. You can update with this command:

With all of that done, you only need to install Wine in Lubuntu. That’s easily done:

That’s all there is to it, at least at the basic level. As I don’t use Wine, because I don’t use Windows software, I’m going entirely from my notes and a time when I did try to retain some Windows software. (Crimson Editor, I’m looking at you.)

Closure:

There’s a lot more to this, but that’s the gist of it. If you want to install Wine in Lubuntu, it’s not all that difficult. You may then want to do things like install Plays On Linux or whatnot, but I don’t think that’s technically required. So, this is just an intro to Wine. There’s much more to it.

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.

Update Python Packages (PIP)

We’ve had a run of Python packages recently and you can tell that I’m a fan because today we will discuss how to update Python packages that were installed via PIP. This should be a pretty easy article to follow along with.

Before diving into the world of installing Python packages from a centralized repository (via PIP), you should probably be familiar with the entire process. So, read these two articles before proceeding:

Install Python’s PIP Part One

And then follow up with this article:

Install Python’s PIP Part Two

It’s important to upgrade the packages you’ve installed with PIP. All software requires updates. Bugs are fixed with newer software but, more importantly, security issues are addressed with updates. This doesn’t just apply to Python. It applies to your whole computer. Software gets updated and you need to apply those updates.

So, today we’re going to do some maintenance and we’re going to update Python packages. Rather than waste time with a long intro, let’s get started!

Update Python Packages:

Just so you know, Python packages are installed in the terminal. So, it stands to reason that updates are also done in the terminal. To follow along in this article, you will need an open terminal. So, if you want to update Python packages you should start by opening a terminal. You can usually just CTRL + ALT + T to open your default terminal emulator.

With your terminal open, let’s first ensure PIP is installed with this command:

Next, make sure PIP is updated to the newest version:

With PIP upgraded to the most current version, you can check to see which Python packages you have previously installed. That’s done like this:

Now, you can see which packages can be updated to newer packages:

That will give you an output similar to this:

Now, you can update the packages, like so:

You can also do multiple packages at the same time:

By doing this, you can update your Python packages, at least those installed via PIP. That is indeed pretty easy.

However, I have a command that I certainly didn’t come up with. This is a command I found in my notes and I do not see a reference URL – or I’d cite the source. Doing some searching, I saw that this command is referenced at multiple sites. So, finding the source is problematic for me.

If you want to upgrade all the Python packages at once, try this command:

I tested this and it appears to work well enough. PIP does love to throw errors in the terminal but generally works okay. That command should update all the packages you’ve installed with PIP – including any Python dependencies that were installed at the same time.

See? It’s pretty easy to update Python packages…

Closure:

Well, now you know how to update Python packages. I figured that this was an important article to write. If you’re going to use PIP to install Python packages, you might as well know how to keep yourself secure and how to keep yourself updated. That seemed reasonable.

However, my Python skills aren’t that great. I can do a Hello World program and that’s about it. I haven’t even done that in a while. So, don’t go asking me detailed Python questions! I probably won’t have an answer. My use is pretty limited to things I can trivially install with PIP.

Also, you may not want to ask me questions. While I’ll be polite, my time is constrained these days. I’m just as likely to refer you to a forum or two. You can ask questions. If they’re good, I’ll maybe answer them in an article. I’m just pointing out that you shouldn’t expect too much from me.

“If you don’t expect too much from me, you might not be let down.”

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.

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as we’re going to save a command’s output to a file – while showing that same output in the terminal. This is something we’ve not quite done on this site before and something you might find interesting.

NOTE: This article assumes that you’re using Bash.

We’ve sort of covered redirect operators before. Read this article:

How To: Write Text To A File From The Terminal with “>” and “>>”

However, this time, you’re going to enter a command and see the output in the terminal, unlike what you’d see in the above-linked article. On top of that, you will simultaneously save that output to a file.

This can be handy to keep track of a command’s output over time. This can also be handy if you’re trying to audit a system and want to keep track of the output from the command.

For this article, we’re going to just use a simple example command. We’ll be making use of the uptime command because it’s easy and universal. If you’re using a desktop (or server) Linux, you have this command available.

How To: Find Your Uptime In Linux

This article is also going to make use of the tee command. If you’re a regular reader, you’ll know we’ve covered this command before. Then again, if you’re not a regular reader, you can just as easily learn about the tee command by reading the following article:

Mastering The Power Of Linux Tee Command

We’ll also be using the terminal, of course. We almost always use the terminal!

Save A Command’s Output To A File:

As suggested above, this is another article that relies on an open terminal. You can usually open a terminal by pressing CTRL + ALT + T on your keyboard. A terminal is otherwise available in your application menu.

With your terminal open, let’s just view your uptime with this command:

Next, we’re going to tell the command to show the output AND save the output to a file. That’s quite simple:

So, let’s try this example command:

Now, you can verify that this worked with this command:

Every time you run that command, it will clear out the existing text and write the most recent output to the uptime.txt file.

If you’d rather append the data, that’s easily done. It looks like this:

Again, as a handy example:

If you run that command multiple times and then check it with cat uptime.txt you’ll see that the -a flag will append the output. So, each time you run this command it will add the new output to the file.

That’s all there is to it. This is a handy thing if you want to monitor the output of a command over a period of time. You can alias the uptime command to this command and have a record of all the times you ran the uptime command in the terminal.

I’m sure there’s more that you can do with it, but that’s a basic idea that you can take with you. It’s a pretty handy command and one that I recently shared via PM with a Linux.org user. Seeing as it was on my mind, I figured I’d make it an article. I’d call it a ‘short’ article but the title was already too darned long!

Closure:

Now you know how to save a command’s output to a file while also showing the command’s output in the terminal itself. This is a handy enough command and easy enough to do. It seemed like it’d make an easy article for folks, so I wrote it. I don’t have any other justification, though it was not all that taxing to write.

In my defense, I deserve an easy article now and then!

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.

Demystifying journalctl: A Comprehensive Guide to Linux System Logging

It was suggested that I write an article about journalctl, which seemed like a large topic. I decided that I’d let AI have a shot at it, so this article was written by ChatGPT.

It took a few prompts to get what I wanted – which turned out to be the first result. I gave the AI the chance to rework the article but the result was that I much preferred the initial offering. After all, I was only after a very light overview of the journalctl command. 

There’s a lot to the journalctl command. The journalctl command is far too much to cover in a single article. Heck, I don’t even know some aspects of the command. You can see this by checking the man page with the following command:

See? There’s a lot to the command. At the end of the day, AI did a good job of summing up what you really need from the command as an average user. So, I’m going to go ahead and publish that content. It did a better job than I’d have done!

Introduction To journalctl:

In the realm of Linux system administration, understanding and managing system logs is indispensable. Logs provide crucial insights into the health, performance, and security of a system. Among the plethora of tools available for log management, journalctl stands out as a powerful and versatile command for accessing and analyzing logs in systems utilizing systemd. In this comprehensive guide, we will delve into the intricacies of journalctl, exploring its features, functionalities, and practical applications.

Understanding Systemd Journal:

Systemd, the init system adopted by many modern Linux distributions, introduced the systemd journal as a replacement for traditional syslog. The journal, stored in binary format, offers numerous advantages over syslog, including structured logging, faster search capabilities, and enhanced metadata.

journalctl serves as the primary interface for querying and interacting with the systemd journal. It provides administrators with a rich set of options for filtering, displaying, and analyzing log entries, empowering them to effectively troubleshoot issues, monitor system activity, and extract valuable insights.

Basic Usage:

At its core, journalctl allows users to retrieve and view log entries from the systemd journal. The simplest invocation of journalctl displays the entire journal, starting with the most recent entries:

This command presents a paginated output of log entries, including timestamps, log levels, and message contents. By default, journalctl displays logs from the current boot session. However, it also supports options for querying logs from previous boots or specific time ranges.

Filtering and Querying:

One of the key strengths of journalctl lies in its ability to filter log entries based on various criteria. Administrators can narrow down the search results by specifying filters such as time range, log level, systemd unit, or specific fields within log messages.

For example, to display all log entries generated by the sshd service, the following command can be used:

Similarly, to retrieve logs pertaining to a particular time range, the --since and --until options can be utilized:

Additionally, journalctl supports advanced filtering using Boolean expressions, enabling complex queries to be constructed for precise log retrieval.

Output Formatting and Presentation:

journalctl offers flexible options for customizing the format and presentation of log entries. Administrators can choose from various output formats, including short, verbose, and JSON formats, depending on their preferences and requirements.

For instance, to display log entries in a more detailed and verbose format, the -o verbose option can be used:

Moreover, journalctl provides options for controlling the display of timestamps, including the ability to convert timestamps to the local time zone or display them in a human-readable format.

Real-time Monitoring and Follow Mode:

In addition to viewing historical log entries, journalctl can also be used for real-time monitoring of system logs. By invoking journalctl with the -f or --follow option, administrators can tail the journal and receive live updates as new log entries are added:

This feature is particularly useful for monitoring system activity in real time, diagnosing issues as they occur, and tracking the progress of system services during startup and shutdown sequences.

Integration with Other Tools:

journalctl seamlessly integrates with other Linux system administration tools, enabling administrators to combine its capabilities with those of other utilities for more comprehensive log analysis and management.

For example, grep can be used in conjunction with journalctl to perform pattern matching and further refine log queries:

Furthermore, administrators can leverage shell scripting and automation to automate log analysis tasks, extract meaningful insights, and trigger alerts based on specific log patterns or conditions.

Conclusion:

In conclusion, journalctl emerges as a powerful and indispensable tool for managing system logs in Linux environments utilizing systemd. Its rich feature set, flexible filtering options, and real-time monitoring capabilities make it an invaluable asset for system administrators, enabling them to effectively diagnose issues, monitor system activity, and ensure the stability and security of their systems.

By mastering the intricacies of journalctl, administrators can gain deeper insights into system behavior, streamline troubleshooting workflows, and maintain the optimal performance of their Linux infrastructure. Whether it’s debugging a system issue, auditing security events, or analyzing performance metrics, journalctl empowers administrators to navigate the complexities of system logging with confidence and efficiency.

Closure:

Well, I keep finding uses for AI. This is a better article than I’d have written. I think I’ll next use AI for a solid article about grep. That sounds like a reasonable subject and it’s an article that I can reference in many other articles. In fact, I should have done an article about grep already!

So, this is an article about journalctl. It’s an overwhelming command. It’s amazingly complicated and powerful, but you (as a regular user, as most of my readers are) will only need to know the basics. This is indeed the basics and they appear to be well-described.

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.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.