How To: Find The File System Type

Today’s article will be an article that is fairly simple and easy enough for almost anyone, as we discuss how to find the file system type. We’ll discuss a few ways to find this information and we’ll be doing so in the terminal. If that’s something you’re interested in learning, this just might be the article for you!

Before you installed Linux, you formatted the disks. You chose (or didn’t bother choosing) which file system you wanted to go with. There are numerous options, each with its own set of features. Among the choices are file systems like ext4, Btrfs, ZFS, and more!

Here’s a giant list of file system types.

You use file systems on every bit of storage media, even if it’s done behind the scene and not something you manually interact with. If you’re using a thumb drive, it’s formatted with a file system type. This is true even with an SD card, external hard drive, solid-state drive, and all the rest. It’s required for storing and organizing data.

Well, rather than make this a longer article, we can just cut to the chase…

Find The File System Type:

As I mentioned in the intro, we’re going to be using the terminal to find the file system type. So, you’ll need an open terminal. Usually, you can just press CTRL + ALT + T to open the default terminal.

With your terminal open, you can try the following command:

The output of that would look similar to this:

If you look, you’ll see one of the columns is helpfully labeled ‘type’ and that’s the file system type. If you just care about the first two columns, you could run something like this:

You can also use the ‘lsblk’ command to find the file system type. This might be the command most folks are more familiar with and the command you’d want to run would be this:

The output of the command would look similar to this:

Again, the second column is helpfully labeled as “FSTYPE” which stands for ‘file system type’ – which is exactly the information we’re after and exactly the information mentioned in the article’s headline.

See? Pretty neat! You can easily find the system type with just a couple of commands. There are other ways, but these are a couple of quick and easy ways. If you don’t know the file system type, perhaps because you’re new and didn’t pay much attention during OS installation, you can now do so.

Closure:

Well, it’s another article. It’s probably not the most interesting of articles, but not all articles are going to be that interesting. Today we cover file system types and how to find them, who knows what the next article will be? One thing you can be reasonably certain of is that there will be another article in just a couple of days. If this one didn’t interest you much, the next one might be right up your alley!

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.

Boot To Text Mode In Linux

Today’s article will be a quick and easy article, so easy that a newbie can follow it, and will cover how to boot to text mode in Linux. Booting to text mode is something you might want to do for troubleshooting or repair. It might look hard, and require some good timing, but it’s not all that challenging.

What do I mean?

Well, when you boot your personal computer with Linux on it the system boots into a graphical environment, a GUI. If you boot to text mode, there’s no GUI being loaded. It’s just like you were working in the terminal, but there was no GUI to fall back on. 

For most people using Linux on the desktop, this isn’t something done all that often. It’s mostly useful for things like the above-mentioned troubleshooting and repair. When there’s a problem that’s exacerbated by the GUI, booting to text mode is a good idea and a great feature.

This is only for systemd users and is sometimes called ‘console mode’. This article also assumes that you’re using GRUB as your bootloader. If either of those is not true, you can safely ignore this article.

If you’re asked at a forum to repair your system by booting into text mode, this is the article for you. It’s not something you’ll need often, but it’s something worth knowing, or at least knowing that it can be done. It’s not even all that complicated.

Also, if you noticed an outage yesterday, there was a giant dumpster fire that needed to be put out. It wasn’t a literal dumpster fire, just a bunch of crap that all managed to land at the same time.

The symptoms made me think the site was hacked, but that’s not what happened. There were some changes made at the server level and things did not trickle down. The server migration went well for many people, but I have a complicated setup. I also use a CDN, which further compounded the issues.

Things were fixed upstream. There was no hack, but there were some traffic spikes recently. Nobody’s personal information was leaked. No software was compromised. It was just a ****storm that required more effort than expected.

The server is still being worked on as I write this article. Data was seemingly corrupted in multiple tables, which shows the value of backups. Nothing of any value has been lost in the process – except some traffic. I hope that those people were able to find the information they were looking for, and I formally apologize for the downtime.

Boot To Text Mode:

You need some pretty good timing for this and it may take some people a few tries to get it right. I’ve done this many times and I still don’t always get it right on the first try.

When you boot your computer, it performs the “POST” (which is the Power On Self Test). It goes by quickly these days. In many cases, it doesn’t even tell you that it’s performing the POST. In those cases, it may show you a logo for the computer. It happens on your computer, even if you don’t see it.

Now, between the end of the POST and before Linux starts loading, you need to press a key to stop Linux from loading. You want to access GRUB.

The key you press is going to vary, but it’s just one of two keys.

If you’re using legacy (BIOS) then you need the SHIFT key.

If you’re using UEFI, then you need the ESC key.

After POST ends and before GRUB loads Linux, you need to press the appropriate key. You need to know which you’re using, BIOS or UEFI. You could just keep trying until you find out which one works for you. With the reduced friction between Linux and UEFI, you might not know which system you’re using. I suppose that’s a good thing.

Anyhow, you should end up with a screen that looks like this:

the grub menu
The helpful arrow is your next step in this process of booting to text mode.

As you can see, you next want to press the E on your keyboard.

You’ll next see a screen that looks like this:

this is the boot parameters in use
These are the boot parameters in use by GRUB. We’ll edit this.

Use your arrow keys to navigate to the line that begins with linux.

Make sure the line also includes vmlinuz.

The line you want to edit will start with the first word and contain the second word, but it will exist.

You want to go to the end of that line. Depending on your GRUB resolution, the line may span multiple lines. In other words, you’ll be editing where there’s a hard new line and not paying attention to the actual formatting.

That may look something like this:

this is the file you want to edit.
That’s the line you want to edit. Note that it spans two lines.

At the very end of that line, you simply need to hit the space bar and add the number three. Like, literally, you’re just adding:

In the example image above, that 3 would be added just after the word ‘handoff’. The 3 is telling the system to boot to the multi-user.target and doesn’t load a graphical environment.

There are directions at the bottom, but just press F10 to continue booting to text mode. The next screen you see should look a whole lot like this one:

This is the result if you decide you want to boot to text mode in Linux.
Tada! That’d be a success. If you see that, you’ve booted into text mode! Congratulations!

This isn’t a permanent change. When you use this method to boot to text mode, you’re only going to boot into text mode that one time. There are ways to set the computer to always boot to text mode, but that’s not within the scope of this article. 

You may have to try this a few times. The process is simple after you get to the GRUB menu, but accessing that GRUB menu may be problematic. You may need good timing (unless you’re set to display this screen on every boot) to access the menu in the first place.

Again, you’ll need to know if you’re using BIOS or UEFI. That’ll help you avoid frustration. I linked to it above, but it wasn’t all that well highlighted. I’ve written an article that teaches you how to tell if you’re using BIOS or UEFI.

Knowing which key will bring up the GRUB menu might just save you a bunch of frustration, as I know this has frustrated people in the past. This bugged one user enough for them to insist their OS didn’t have the option, that it was impossible to do. (They were using one of the official Ubuntu flavors, with a default install. So, they were just upset that they couldn’t get it working.)

Closure:

If you remember the intro well, you’ll know that this article has some drama behind it. You’ll know that the site was down yesterday and that there were continued issues today. I was awake at 04:30 to see if the site was up and running. Things looked pretty good.

I then wrote one article and the system went crazy, crashing when I tried to schedule it for publication. The upstream hosting company then tried some more magic potions and they wanted me to try again.

Alas, that ate the article I wrote…

Fortunately, WordPress is awesome and they stored a cached copy in my browser’s cache. They found this and propagated almost all of the fields. This was great!

That was when I noticed that I’d already covered that subject in the past – twice in fact. In my defense, I write a lot of articles and this was a fine subject to write about. 

At this point, I just wrote another article. That’s this article, for those who weren’t keeping track. We’re still not 100% certain that all the bugs are ironed out, but we’ll see. I’ll schedule it for publication at the usual time and try to observe this as much as I can. This presumes that I’m able to save it and schedule it without any problems. We shall see… (The save draft button does appear to work.)

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.

Open ‘WebP’ Images In Linux Mint

Today’s article shouldn’t be all that complicated, as we’re just going to touch on how to open WebP images in Linux Mint. I am not sure how many people this will help, but it seems like a good idea for an article. It’s also something I’ve recently dealt with, so it’s fresh in my memory. So, if you want to open WebP images in Linux Mint, read on!

Why Linux Mint? Well, because I know it works in Linux Mint. I just happened to be using one of my Linux Mint systems when I encountered this problem. I’m positive this works in other distros, but I’ve only tested this with Linux Mint.

The Story:

I wrote an article about how to disable window grouping in Lubuntu. A lovely friend pinged me to a question on AskUbuntu that involved this subject, suggesting that I answer it. I decided to answer the question.

Being lazy, I wanted to answer the question using the same screenshot I’d used in the article. I did the rational thing and downloaded the file from the linked page. 

The image had a border around it and I wanted to remove that border. I went to open the file with the WebP extension in my image viewer only to learn that there was no native support. When I opened the file, it showed the image in a new browser tab.

I could open the file in XnView and be done with it, but that wasn’t good enough. I wanted to be able to open the file natively, in my default image viewer. Alas, time was of the essence and I put that task aside so that I could answer the question. Later, I’d return to the problem and find a solution.

For reference, this is what it looked like when I tried to open a WebP file with the default image viewer:

there's no webp support
As you can see, that’s hardly a productive image.

It would happily show the image in the browser I had open because the WebP format is meant for the internet. That’s hardly useful and opening a browser to view an image just seemed like a step too far.

If you don’t know what WebP files are, you see and deal with them constantly – even if you don’t know, you can read the Wikipedia article about WebP files. They’re image files that are optimized for web use.

I wanted to find a way to open WebP images natively in Linux, specifically Linux Mint. My quest sent me down several false trails and I eventually found a solution that worked. This article shares that with you…

Open WebP Images In Linux Mint:

That’s right, there is a solution. To do this, which is open WebP images, we will need to have an open terminal. It’s okay, you only need it for a few commands. So open your terminal emulator. In many cases, you can just press CTRL + ALT + T.

With the first command, we’re going to add a repository:

Follow the directions and add the repository. Then you need to update the list of available software, like so:

Finally, install the following software with this command:

You don’t need to do anything else. That’s it. That is all you need to do. When you next open a WebP image in Linux Mint, you should be able to do so just fine with your default image viewer.

It should look something like this:

when you've completed these steps, you should be able to view WebP images in your default image viewer
See that image? That right there smells like success! It’s a WebP image!

If you click on that image, you can see that it’s a WebP image by looking at the title bar. The application should look familiar. It should look exactly like the default image viewer included with Linux Mint.

And now you know…

Closure:

That’s all there is to it. Linux is great like that. Sure, it took a bit of digging but there was a solution to my problem. Once I knew the correct solution, it was easy to implement. If you want to open WebP images in Linux Mint, you can do exactly that – without all that much effort. If you dream and work hard enough, someone else will have already done all the work and you can just use their software to accomplish your goals!

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.

Use visudo To Edit The sudoers File

Today’s article may take a different format than most, as it’s just an article telling you to use visudo to edit the sudoers file. This type of article doesn’t lend itself to my normal formatting and should be considered akin to a Public Service Announcement. 

So, let’s start with the basics:

What Is The sudoers File?

Very simply, the sudoers file is the file on your system that decides who has permission to use elevated permissions via sudo. The sudoers file is pretty important and it’s easy to make mistakes while editing it. Fortunately, there’s some protection you can use while editing the sudoers file.

If you’re curious, we normally recommend using sudo instead of using root because sudo only gives the command elevated permissions while root always has elevated permissions. Those folks reading my site are generally fairly new to Linux and, as such, I strongly suggest using sudo instead of just logging in as root. Sure, it’s more of a hassle, but it’ll help save you from yourself.

What is visudo?

The visudo command will open your sudoers file with your default text editor. In many cases that will be Vim, but Nano is starting to be the default for more distros. I prefer the latter.

The visudo command defines itself like so:

visudo — edit the sudoers file

Further, and helpfully, you’ll find this in the description:

visudo edits the sudoers file in a safe fashion, analogous to vipw(8). visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors before installing the edited file. If the sudoers file is currently being edited you will receive a message to try again later.

So, as you can see, using visudo will help protect you from mistakes.

NOTE: While visudo can save you from syntax mistakes, it will do nothing to prevent you from entering the wrong information. If you open a second terminal and pre-authenticate for sudo, and do so quickly enough, you can then use that second terminal to fix it (re-editing the sudoers file).

Use visudo To Edit The sudoers File:

The sudoers file is located at /etc/sudoers and is a plain text file. It’s just a configuration file, like so many other configuration files. But, as described above, it’s a very important file. It’s also possible to mount the drive with a live Linux instance to edit the file, but that’s not something I’d recommend. Besides, if you use visudo to edit the sudoers file that shouldn’t be a problem.

You don’t need to specify anything when you want to edit the sudoers file. You don’t have to specify the file’s location. The visudo command knows where your sudo file is (unless you’ve modified this, as you can make a second config file and edit that) all by itself. If you want to use visudo to edit the sudoers file, you simply need this command in your favorite terminal:

The very first line of that file says this:

This file MUST be edited with the ‘visudo’ command as root.

I realize what it says, but in this case, you can replace ‘root’ with ‘sudo’ which will elevate your permissions to those of root. So, we’re sort of still using root to edit the file, but we’re technically just using sudo.

Closure:

There is my PSA about using visudo to edit that sudoers file. You must do so, especially if you’re new. You might be able to avoid a syntax error, but there’s no reason to not use visudo which will check for that sort of stuff.

I suppose the name comes from a time when Vi was still popular and it’s not a complete solution. You can still enter garbage and get garbage results. If you’re unprepared for the potential consequences, you might want to avoid editing the sudoers file until you’ve gained some confidence and have more familiarity with the tools Linux provides.

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 Make A Directory Tree

Today we’re going to install a nifty application and then we’re going to make ourselves a directory tree. We’ll learn a couple of other things along the way, as we often do. Linux is great like that, and so we’ll have some fun along the way – including generating an entirely pointless text file that takes up too much space and takes too much time! That sounds fun to me!

So, what is a directory tree? Well, you start in one directory and then make a “tree” of all the directories below it. The directory you start in will be the top of the tree, and the directories below will be the branches. In its simplest form, it might look a little like this:

using the tree command to make a directory tree
As you can see, that’s part of the tree – with various directories and sub-directories.

You can’t see the parent directory, but there is one. That’s just a piece of the tree, which should be enough to explain this tree concept.

The tool we’ll be using is known as ‘tree’, of course. The man page describes it as being:

tree – list contents of directories in a tree-like format.

You may not have ‘tree’ installed and you will need to install it. It should probably be a default tool, but it is not. Use your package manager, search for ‘tree’, and install it. In Ubuntu/Debian/Derivatives, you can try:

That should get you started and, with tree now installed, we can…

Make A Directory Tree:

If you had your terminal open to install ‘tree’, you might as well leave it open. You’ll need it for the rest of this article. If your terminal is not open,  you’ll need to open it. Just press CTRL + ALT + T. Tada!

Now, the first thing we’re going to do is right there in your home directory, simply make a directory tree with the following command:

That will make a lovely tree. The -d flag means that it will only show directories in the output. That’s what we wanted, a directory tree. However…

You can make a tree with the files included. Just drop the -d flag and try this:

Now, let’s send that output to a file. If you want a tree (with or without files listed in it) as a saved text file, you can try this command:

Now, for some fun, you can try this (it will take a long time):

You need ‘sudo’ for that command so that it can traverse and list the various directories for which you have no permissions. It will take a long time. I want to say that it took about 30 minutes, but I currently have a bunch of external stuff hooked up to this device.

It will also generate a giant text file. Mine was over 500 MB in size. Opening it is a slow and painful process, but it’s not too bad once it is open. There are other options for the tree command, just type man tree to learn more about the tree command.

Closure:

So, now you know how to create a directory tree. You also know how to make your directory tree include files and how to make a directory tree of your entire computer’s file system. I don’t know why you’d need to know this, but now you do. They do make good text documents for small sections of the tree, especially if you need to quickly see the directory structure for some other task.

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.