Meta: The State Of Linux Tips #23

Today’s article is just a meta article, an article that I fail to write every month. The more astute readers of this site will see the #23 and realize how bad I am at keeping to a schedule. Writing meta articles isn’t fun. Writing meta articles doesn’t result in sharing valuable information. These meta articles cover the state of Linux Tips. That’s it.

So, things are going well… Things are going very well from many perspectives. Things are going better than ever!

Why not just throw some data…

For the past year or so, I’ve used a browser extension that helps me write better. It also has a weird feature that sends a weekly message that lets you know how you’re doing. I’ve not yet shared that data, so let’s share that!

Some Meta Stats:

This is just for the past week…

I wrote more than 91% of the rest of the users.
At the same time, I was more accurate than 73% of their users.
For better or worse, I used more unique words than their other users at 93%.

Amusingly, I used about 3500 unique words in the past week and that’s somehow enough unique words to stand out. I didn’t think my vocabulary was that expansive, but I’m constantly assured it is.

Anyhow, my “tone”, as determined by the plugin…

I’m 19% informative.
I am also 17% assertive.
Then, I guess I’m 13% direct and 10% confident.

I have no idea how they came up with those numbers.

Anyhow, there are some writing stats. Keep in mind that I write for more than just this site. I write a lot of text elsewhere. 

Some Site Numbers:

So, we’ve seen some income in sponsored articles, which is nice. Not relying on Google is okay. It’s less income than Google was, but at least you’re not currently wading through ads. We may have ads again in the future, so we’ll have to wait and see. If you don’t want to see ads, you can always donate. 🙂 

We’re currently averaging over 1,000 visits per day. I’ve noticed that we surge ahead and then sort of taper off. It’s like we have some record-breaking months and then we slowly taper off just a little. Then, we have new record months. Last month was not a record-setting month but it was still well over 1,000 visits per day.

Most of my traffic comes from the United States – which would be expected.
You tend to visit for 228 seconds each time you visit.
The average viewer is using Chrome, Chromium, or a Chromium derivative.

These are the most popular pages:

How To: Remove AppArmor From Ubuntu
How To: Convert JPG to PNG
How To: Disable Sleep And Hibernation on Ubuntu Server

Those change around a little but they seem to be the most common.

For the record, most of my traffic comes from Google.
That’s followed by DuckDuckGo.
The next is traffic from Linux.org.

About 92% of you are using Linux already.
Less than 4% of you are using Linux.
Just about 3% of you are using a Mac.

So, those numbers make perfectly good sense. Getting good numbers from your statistics isn’t an easy task. Various stat applications excel at different things. But, those numbers are fairly similar to what I see elsewhere.

Closure:

That’s right. This was just a meta article. Things are going okay, or at least way better than I ever expected. I don’t have any sponsored articles lined up so we’ll have to see how that goes this month. I’ve changed my policy quite a bit, letting folks know that I can be flexible. So, we’ll see what happens.

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.

Monitor System Resources With “Resources”

Today is one of those days when I’d like to introduce you to new software as we learn to monitor system resources with “Resources”. That may not make much sense, but it will! The Resources application is a great option if you want a great way to monitor system resources.

I may do a few articles about monitoring system resources. That’ll be fun.

It’s probably important to mention that many of you will not have this in your default repositories. For those who do, it won’t be in the typical repositories but will exist because your distro ships with Flatpaks enabled.

That’s right. To use this article, you should read a previous article:

Installing Flatpaks In Linux

Once you get Flatpak installed and the FlatHub repository added, you can use a great application known as Resources.

Of course, your desktop distro shipped with a GUI resource monitor and it’s usually fit for purpose. However, this Resources application has a bunch of great features and it is easy to live with. 

Another great thing is that this shouldn’t be a very long article…

Monitor System Resources:

Once Flatpak is installed, you might want to keep your terminal open. Yes, Flatpaks are large – but they have great features, including running in isolation and shipping with all their dependencies.

Most of you can open a terminal by pressing CTRL + ALT + T. If that doesn’t work for you, you’ll have a terminal option in your application menu. It might be under the Administration sub-section.

With your terminal open, you can install Resources quite easily:

That should add Resources to your application menu. It will fall under the Administration sub-section. I’ve seen some distros not show newly added Flatpaks in the menu until after a reboot. If that’s the case, you can manually run Resources with this command:

Once you open the application, all will be revealed. Here’s an image:

Resources default screen.
This should be self-explanatory if you’ve monitored resources before.

One of the great things is that you can monitor applications that might have multiple processes – such as Google Chrome. You can also monitor processes individually, including closing those applications and processes.

Additionally, you can monitor CPU use, memory use, GPU use, and your various storage devices – including optical media. If you want to know read and write speeds on the fly, that information is available in an easily understood graphical tool.

That’s right… I’m covering a graphical tool today! Let it be said that a GUI is sometimes a good tool for the job and that the Resources application is one of those tools.

If you click on the hamburger menu near the top, you can also adjust your preferences. You can choose to display more information than the default and adjust how you’d like to read things like temperature values. It’s a pretty handy application.

Yes, you already have a GUI tool to monitor system resources but you can opt to use this one instead. It’s a pretty large file (or multiple files) but that’s to be expected with Flatpaks. So, get a coffee going while you wait for the application to install.

Closure:

So, there’s a GUI tool you can use to monitor system resources. It’s worth investigating. Some of you may like it well enough to switch to it entirely. Others may find they reach for it when they need more information than they usually have available on one screen. Either way, it’s a handy application and one worth knowing about.

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.

Installing Flatpaks In Linux

Today we’re going to have a pretty easy article where you’ll learn about installing Flatpaks in Linux. I’m writing this article because I want to write another article. Once I write this article, I can write that article!

I did write a previous article about installing Flatpaks in Lubuntu. I want this to cover more distros than that, so that’s one of the reasons for this article.

So, I asked AI to tell us about Flatpaks… Let’s see how it did.

“ChatGPT, explain Flatpaks in Linux please.”

Flatpak is a modern packaging format for Linux that aims to simplify the distribution and installation of software applications across different Linux distributions. Here’s a breakdown of Flatpaks in under 600 words:

What is Flatpak?

Flatpak is a technology developed for Linux-based operating systems that allows developers to package applications and their dependencies into a single, portable format. These packages, called Flatpaks, are designed to run on any Linux distribution, regardless of its specific package management system.

How does it work?

Flatpak packages contain everything an application needs to run, including libraries, dependencies, and runtime environments. This eliminates compatibility issues with different distributions and ensures that applications run consistently across different Linux systems.

Key Components:

  • Flatpak Runtime: A standardized environment that provides essential libraries and services needed for applications to run. Runtimes are shared among multiple applications, reducing duplication and ensuring consistency.

  • Flatpak Builder: A set of tools that developers use to create Flatpak packages. Builder automates the process of bundling applications and their dependencies, making it easier to package and distribute software.

  • Flatpak Repository: A centralized location where Flatpak packages are hosted and made available for download. Users can add repositories to their system to access a wide range of Flatpak applications.

Benefits:

  1. Cross-Distribution Compatibility: Flatpaks are designed to work on any Linux distribution, simplifying software distribution and installation for developers and users alike.

  2. Isolation: Each Flatpak application runs in its isolated environment, with its own set of dependencies. This improves security and stability by preventing conflicts between different applications and system libraries.

  3. Sandboxing: Flatpak applications can be sandboxed using various security mechanisms, such as containerization and permission controls. This reduces the risk of malicious software compromising the system.

  4. Upstream Compatibility: Flatpak packages are often built directly from upstream sources, ensuring that users get the latest versions of software with minimal delay.

How to use Flatpak:

  1. Installation: Most Linux distributions provide tools for installing Flatpak support. Once installed, users can add Flatpak repositories to their system to access a wide range of applications.

  2. Searching and Installing Apps: Users can search for Flatpak applications using the command-line interface or graphical software centers. Installing a Flatpak is as simple as running a single command or clicking a button in the software center.

  3. Running Flatpak Apps: Once installed, Flatpak applications appear alongside native applications in the system menu. Users can launch them like any other application, and they will run within their isolated environment.

Drawbacks:

  1. Storage Overhead: Flatpak applications include their dependencies, which can lead to increased storage usage compared to traditional package management systems.

  2. Performance Overhead: Running applications in a sandboxed environment can introduce some performance overhead compared to native installations, although this is usually minimal.

Final AI Thoughts:

Flatpak is a promising technology that addresses many of the challenges associated with distributing and installing software on Linux. Its cross-distribution compatibility, isolation, and security features make it an attractive option for both developers and users looking for a more streamlined and secure software ecosystem on Linux.

So, that explains Flatpaks according to ChatGPT. I think it did a great job in this role, but that’s all I wanted ChatGPT to do for me.

Installing Flatpaks In Linux:

This is going to require a terminal. Some distros will have Flatpak installed and be able to install Flatpaks from the GUI. So, open up a terminal before proceeding. You can usually open a terminal by pressing CTRL + ALT + T but some of you will have to open a terminal via your application manager.

Some distros will come with Flatpaks already enabled. If you have Flatpaks already enabled, you can skip this article. To find out if you have Flatpaks already enabled, run this command:

If that returns a version number, you already have Flatpaks installed.

By the way, if you have Flatpaks enabled but not the centralized repository (FlatHub) then you may still need to run the following command:

Anyhow, now on to the installation instructions:

Debian/Ubuntu:

Linux Mint:

Already Installed.

Fedora/CentOS:

Already Installed.

RHEL:

Rocky Linux:

SUSE/OpenSUSE:

Arch:

Manjaro: 

Already Installed.

There you go. Those are the distros I usually cover. One of those commands is going to work for most of you. If those commands do not cover you, you can likely install Flatpak from your repositories. It should be fairly easy.

As you can see, more and more distros are starting to ship with Flatpaks enabled by default. I’ve seen more of this since Ubuntu started shipping Snaps by default, so maybe those distros are trying to provide something similar while not relying on Ubuntu.

Anyhow, once you’ve done this, you can visit FlatHub to start installing software:

FlatHub

Then, I shared the command earlier, if you find the repo isn’t working properly, you can run the following command to try to fix it:

That should do it. You can now use Flatpaks and I can write that future article!

Closure:

If you’ve ever needed to know about installing Flatpaks in Linux, this is a start. This is the preparation and, once done, you should be able to install software from the repositories easily enough. There are a ton of great applications that you can use after installing Flatpaks in Linux, or at least enabling Flatpaks in Linux.

Also, this seemed like a bit ‘over-the-top’ as far as ChatGPT responses go. It was more verbose than it usually is. I did decide to include all of the output as it does make for a more interesting article. That’s far more than I’d have written about the subject. 

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.

Setting Up Coding Environments on Linux for Educational Use

With so many strong attributes, such as robustness and flexibility, Linux stands as a powerful platform for teaching coding among many other educational purposes. So this guide is meant to help educators and students set up a suitable coding environment when they are on this journey of learning to program.

Step 1: Choose the Appropriate Distribution of Linux

The first thing needed is choosing a suitable distribution of Linux. For novices, it is Ubuntu or Linux Mint, as these two can be user-intuitive and include many documented features and options. Some other users more advanced may incline towards Fedora or Debian for the vastness of packages and community support. If you want a comprehensive course for children programming that can work with these distributions, Codemonkey offers quite a few interactive coding courses.

Step 2: Install Required Software

Once the Linux system runs on your computer, you are supposed to install software in order to be able to code. Essential tools include:

Text Editors: Using Atom, Visual Studio Code, or Sublime Text for writing out code.

Compilers/Interpreters: If you’re going to teach a programming language, then just install Python, GCC for C/C++, or JDK for Java.

Version Control Systems: Git for tracking changes in code and enabling collaborative development.

Step 3: Setting up a Development Environment

Configure the environment post installation of the required software.

Customize the IDE: Most IDEs, and text editors, for that matter, will support the ability to easily change settings. Make slight changes to the settings to fit your educational needs, such as setting up auto-save, and enabling line numbering and syntax highlighting.

Install Extensions: Extend the functionality of VS Code to include linters, code formatters, and debuggers.

Create a Project Template – You can create project templates for subjects that students may use to jumpstart their assignments.

Step 4: Using Learning Tools

Think about including instructional and collaboration tools:

  • Code Sharing Platforms: Use tools such as GitHub Classroom to be able to distribute assignments and collect student submissions.
  • Interactive Learning Environments: Jupyter Notebook is a really good platform to write Python since you are able to see code and output in real time.

Step 5: Ensure Accessibility and Security

It ensures that every student is provided with the necessary resources for their needs.

Accessibility: Configure accessibility options available in Linux to accommodate all students.

Security: Install a firewall and regularly update to prevent unauthorized access to the systems.

Step 6: Documentation and Additional Support

Finally, give resources that can enable the learner to self-study:

  • Write Documentation: Provide tutorials or links to online tutorials, on tools and languages you are teaching.
  • Support Offered: Providing forums or chat groups where students can ask questions and help one another.

Final thoughts

Setting up a Linux-based educational coding environment first requires making extensive plans on all the necessary tools and resources and then going ahead to implement the laid plan. Through these steps, instructors can create a stable and effective environment in which their students can learn.

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.

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