How To: Kill A User Session

Today’s article won’t be useful for many of my regular readers because it’s about how to kill a user session. This is a skill worth learning, but really only applies to computers that have multiple people logged in at one time. If that’s describing you and your needs, this may be an article worth reading.

Of course, if that’s not something you do, you can still learn from this. It’s not all that complicated and is easy enough to follow. So, feel free to learn something – even if it isn’t something you’re likely to ever need.

There are times when you may have someone logged in and you want to log them out. For example, let’s say you’re getting ready to fire someone. You’re going to want to delete their account, make sure they’re logged out of their account, and then take them to HR where you can file paperwork and escort them (and their property) off the site.

You might also want to do stuff like log people out so that you can perform updates on the server. There are all sorts of reasons why you might want to kill a user session. Your reasons are your own. I’ll simply be showing you the tools.

Kill A User Session:

You’ll need an open terminal and to be connected to the computer you want to control. If you’re doing this, I’ll assume you’re aware of how to do those things. If you’re doing this on your own computer, you can usually press CTRL + ALT + T and your default terminal should open.

Once you’re connected (or have your own terminal) you can find the logged-in users with the following command:

Actually, you can just use this command:

The results are the same. So, either works.

You can now see the output which will show you every logged-in user on that device. Next, you’ll kill a user session with the following command:

If you wanted to use the kill command, you could find the associated processes (the PID) but there’s no reason to do so when you can just kill a user session with the username.

Closure:

There you go. I figured I’d do a nice, short, and easy article. It’s not very complicated and it’s not something many of you will need. However, if you’re managing a system with multiple people logged in, this is a very useful tool to have. You never know when someone’s going to come into your office and ask you to kill a user session. Well, now you know how…

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: Make A Linux Install USB

Today’s article is going to be a rather basic article, with worthwhile information, about how to make a Linux install USB. This won’t be too complicated, even if it looks complicated initially. It probably won’t even be a very long article.

If you want to install Linux, you will need some sort of install medium. That can be almost any sort of drive, including some distros that are still small enough to fit on a CD. Heck, if you can get your computer to boot to it, you could even use a MicroSD as your installation media.

We’ll be doing this in the terminal. Why? Well, because it’s not that hard and it’s a fairly universal process. You won’t even need to install anything new! But, if you don’t have any interest in doing this in the terminal (or if you’re not using Linux right now) you can always do this with a GUI. See the following article for more details:

balenaEtcher: A Tool To Turn Linux .ISO Files Into Bootable USB Drives

There’s also Rufus, should you be using a Windows computer. You have options outside of the terminal. Though, I haven’t done an article on using Rufus. I don’t have any Windows devices. (If you want to write said article, feel free to let me know. I love guest articles.)

What You Need:

These are the tools you’ll want to have available. It’s not a long list, so we won’t have too much to deal with.

  1. A blank USB drive, large enough to hold the data.
  2. Any distro with lsblk.
  3. The ability to unmount a disk.
  4. A distro with the dd command.

So, I’ll assume you have the first aspect covered. Everything else is software. They’re standard tools that are available on all but the tiniest of distros.

The first tool is lsblk, which the man page describes as:

lsblk – list block devices

Then you’ll need the obverse of mount, which is unmount. This is a part of the mount command. It doesn’t have a command of its own. That mount command is described as:

mount – mount a filesystem

And, finally, you’ll need the dd command. That’s simply described as:

dd – convert and copy a file

And that’ll be all you need. Well, you’ll need an open terminal, of course! So, let’s cover one way that you can…

Make A Linux Install USB:

Like I said, you’re going to need a USB drive. This drive must be big enough to hold the data. You’ll need to insert the drive and then open the terminal. To open the terminal, just press CTRL + ALT + T or open it from your application menu.

With your USB inserted, you need to identify where it is mounted. You can do that by running the following command:

You should be able to easily identify the USB drive by the size of the drive. The data you want will begin with “sd”, often something like “sdb” or “sdc” (enumerating as you increase mounted storage devices).

Take that information and run the following command:

The next command might look complicated, but just follow the directions and you shouldn’t have any trouble as you make a Linux install USB. The command looks like this:

For example, if the disk identifier was “sdc” and the path to the .iso was something like “~/Downloads/Lubuntu_22.04.iso” the command would look like this:

Then, just wait a few minutes. Let the dd command do its thing and you’ll end up with a bootable USB drive that will let you install Linux. (This also works for other image files, of course.)

Closure:

See? It’s not that complicated to make a Linux install USB. So long as you pay attention, you won’t have much to worry about. There are a few commands that you need to worry about, but those are basic commands in this instance.

I will warn you to be absolutely certain of the path for the dd command because it has the potential to make you have a really bad day. But, if you don’t want to deal with installing a GUI application, or you are in a position where you can’t install a GUI application, this is a way for you to make a Linux USB installation drive to get yourself out of a sticky situation.

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 Flatpaks From The Terminal

Today’s article is just going to be nice and quick. It is just going to be about how you can update flatpaks from the terminal. This might be something you’re interested in learning. So, if you want to know how to update flatpaks from the terminal, this is the article for you!

Trust me, this shouldn’t take too long. That’s good because I’m not sure how long I have! I’m having some desktop computer issues. I have laptops, yes plural, available, but I hate typing on them. I could just hook up an external monitor and keyboard, but that’s a lot like work. If I was interested in doing work, I’d investigate why my desktop PCs keep dying.

What Is A Flatpak:

A flatpak is an application package format. To enable flatpaks, you’ll have to install some software first. That seems like a good article that hasn’t been written yet.

Anyhow, a flatpak comes with all the dependencies it needs to run. It is also run in a sandbox, meaning it is more secure as it runs independently of the operating system and other applications. As they run independently, they’re able to be installed (in theory) on any distro. You don’t need to make a flatpak for each distro’s package manager, you can just make the one flatpak and it should work everywhere.

If you have something like the Gnome Software Manager and you’ve installed the initial flatpak software (software that enables you to use these packages in the first place) then you’ll see that it integrates flatpaks into the system. In that case, flatpaks will update with the rest of the system and you don’t need to worry about updating flatpaks in the terminal.

On the other hand, this may not be true for you and you may not realize that you can update flatpaks from the terminal. Which means this is for you…

Update Flatpaks From The Terminal:

Of course, this means you need an open terminal. Just press CTRL + ALT + T and your default terminal should open. You may need to open the terminal from your application menu, but the above key bindings are fairly universal.

The command is really simple if you want to update flatpaks from the terminal. To do so, you simply run this command:

Notice that you do not need sudo or any elevated permissions. Many folks list this command as a sudo prefaced command and that’s not necessary. The flatpaks installed are installed in a way that the files belong to the user. As such, there’s no need to use elevated permissions.

While you’re there, there’s a lot that one might not know about the flatpak application. I highly suggest you check out the man page to learn more – as there’s quite a bit that you can do with the application.

Yeah, that should show you all the options you have. There are far too many options to cover in this short article about updating flatpaks from the terminal.

Closure:

So, yeah… I told you that this would be a nice and short article. There’s a way to update flatpaks from the terminal and this is how you do it. You might as well know how to do so. It’s not complicated and might come in handy someday, especially if you’re expected to update them manually.

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.

Let’s Mount An .iso In Lubuntu

Today we’re going to discuss something you won’t need to do often, as we learn about how to mount an .iso in Lubuntu. That seems like a fun article to write and it’s something I just had to do. So, that seemed like a good idea to me.

This shouldn’t be a very long article. I’ll try to keep it simple and straight forward. I figure if you can follow simple directions, you’ve got this licked. It’s not exactly a challenging task. Anyone willing to try hard enough can manage to follow along with this article.

I suppose we should start at the beginning…

What Is An .iso file?

An .iso file is a standard that’s used for images of optical disks. If you’ve used CD/DVD burning applications, it’s what you’re doing when you ‘burn an image’, for example. It’s a single file, meant to be written as an image, and is a file that’s meant to be an optical disk.

You’ll run into .iso files in Linux often. Pretty much every single distro out there is released in .iso format. We don’t always use them for optical disks. You’ll find that a lot of hardware doesn’t even have an optical disk drive. As such, we use the image formats for other things – like USB drives.

We burn these .iso files to a USB so that we can install Linux in the first place. When you’re faced with installing Linux and want (or need) to do it with a USB thumb drive, you’ll want to use tools like balenaEtcher.

So, with Linux at least, you’re likely to run into .iso files. They’re a useful way of sharing a disk image. You’d originally write that disk image to a disk (like optical media) as a single file and then that disk would work. If you try to write an .iso to media as just a file, it’s not going to work as something you can boot from.

You can learn more about the .iso format at Wikipedia. There are other formats for disk images, just so you’re aware. Read the Wikipedia article for more information.

The Mount Command:

We’ll be using the terminal for this command and we’ll be using the mount command for this exercise. As we’re only addressing Lubuntu (though this will certainly work in other distros) we know that the command is already installed and there’s no work for you to do there.

If you check the man page, you’ll see that the mount command is exactly what we need. The man page describes it like this:

mount – mount a filesystem

See? Exactly what we need to mount an .iso in Lubuntu! It’s perfect for the purpose.

You probably mount things all the time. If a disk is usable in Linux, it has been mounted. (You may run checks against an unmounted disk, of course.) If you plug in a USB drive, Lubuntu will happily (assuming your settings are the default settings) mount the drive for you. It’s a handy thing, to have the system smart enough to mount devices when plugged in. It beats the old way of having to mount them yourself manually.

So, the mount application is already installed and you needn’t install anything, but we will be doing this in the terminal. Yes, you can probably manage to do this with some GUI trickery, but you might as well learn how to mount that .iso file in the terminal. It’ll be good for you!

Mount An .iso In Lubuntu:

As mentioned above, we’ll be doing this in the terminal, the way it has historically been done. This isn’t going to be all that challenging, but you first need to open the terminal. To open your terminal, just press CTRL + ALT + T. That should open your terminal.

With your terminal now open, you need a .iso file for this so feel free to download a distro (such as Lubuntu) to your Downloads directory – or wherever you want it to be. You start the mounting procedure by first setting a location for the file to be mounted. Like so:

In theory, you can probably make the directory anywhere, but we will be dealing with convention. If you’re using Lubuntu, things should be mounted as media, and so they go in that directory.

The next step is the actual mounting of the file. This isn’t difficult, you just need to know the path of the .iso and where you just made the directory. That command would look similar to this:

At this point, your .iso file is mounted. You can use the file manager (PCManFM-Qt) to navigate to the files included in the .iso file. You can also list the contents of that file with this command:

With the .iso mounted, you can browse, copy, and extract files from the .iso file. You could theoretically add files to the image, but that’s not always a wise decision. 

When you’re done with the mounted .iso, you can just unmount it with the following terminal command:

This is all you really need to know to mount an .iso in Lubuntu. Try it for yourself, you can’t really break anything.

Closure:

Well, if you ever need to mount an .iso in Lubuntu, you now know how to do so. As I told you near the start, it’s not that complicated. If you just think it through and follow directions, you’ll be all set. It’s not all that often that you need to mount an .iso, but the situation does happen. This is especially true if you’ve done a backup that was a disk image and you need to recover files from it because you’ve had something break.

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 Multi-Part rar Files In Ubuntu

Today’s article is limited to just a subset of users as there aren’t that many people who want to extract multi-part rar files in Ubuntu. This isn’t something you’re going to face often (unless you’re still pirating stuff from Usenet) but it’s something some folks will face. So, this article is for all of those people, all three of you!

I suppose we first need to talk about WinRAR. For those that do not know, WinRAR is a proprietary company that uses a proprietary compression method. Even though it’s proprietary, it has some pretty great features. You have to give credit where credit is due. There are multiple versions of compression used over the years but they all share the same .rar file extension and are all reasonably compatible with one another.

The GUI version of WinRAR is a Windows-only trialware application but there’s a command-line version that can be installed in most distros. While this article is Ubuntu-specific, it’s sure to work with other distros though the installation method may be different. On top of that, many Linux tools (such as file-roller) are capable of extracting files compressed with WinRAR.

This isn’t going to be a very complicated article. It also shouldn’t be all that difficult. I figure folks can follow along if they need to when they need to. This isn’t something the average Linux user is going to face daily. After all, the majority of our software is free! There’s no reason to pirate it! (Seriously, I’m sure there are legitimate uses for multi-part rar files but I’ve only really seen them in frequent use with software piracy.)

Install unrar In Ubuntu:

To extract these multi-part rar files in Ubuntu, you’ll want to install the unrar application. That makes sense, after all. So, like so many things, we’re going to do this in the terminal. You can certainly install unrar with the GUI software installation tools, but we might as well do so in the terminal.

With that in mind, and with this unrar process also being in the terminal, we might as well go ahead and get unrar installed in Ubuntu. First, you can press CTRL + ALT + T to open your terminal. You should also be aware that this is going to pretty much work with any Debian (or Ubuntu) derivative out there. So, this works just as well with Mint, ElementaryOS, or the like…

I suppose we should update first, and you can do that easily enough:

If you trust your upgrades and don’t want to have to manually approve them, then you can just add the -y flag to the end of that, like so:

The next step is going to be installing unrar. You do so like this:

At this point, you can check the man page (man unrar) where you’ll learn that the unrar application describes itself like so:

unrar – extract files from rar archives

That’s a good description and, as you can see, is exactly the tool we want for this operation. If you’re going to extract multi-part rar files in Ubuntu, this is a good tool to do it with. (You can just as easily find a GUI application that will take care of this.)

Extract Multi-Part rar Files In Ubuntu:

I hope you left your terminal open after the installation phase. If not, you’re going to need to open it again. I envision people searching for this specific process and following along. I don’t envision people doing this just for the sake of following along. After all, it’s not like I made multiple-part rar files for you to test this with. You’ll want this article when you need this article.

Anyhow, the process is quite simple.

First, move all of the files into a single directory. This is going to make it much easier. In theory, you could specify the individual paths, but we’re not going to be doing that. No, move all the multiple parts to a single directory. Trust me on this one.

The syntax you’re going to use will be as follows:

No,  you do not include all the other parts. You only need to unrar the first file and the unrar tool will realize that it’s multiple parts and extract them sequentially. It will even tell you that it’s doing so, as it writes that data to the standard output.

This is why you move all the files to their own directory. Again, you only need to tell unrar to extract the very first of the files. It’ll happily find and extract the rest. Of course, you need ownership of the files or you’ll need elevated permissions (such as sudo) to extract the files.

Closure:

So, if you ever need to extract multi-part rar files in Ubuntu, you now know there’s an article that covers this. I don’t expect all that many people to need this information. I do anticipate those who need this information will be able to find this site (or another, I suppose) through a search engine. This isn’t something you’re likely to need every day, even though it’s relatively simple.

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.