6 ways to find out your Linux file system type

How an operating system accesses and manages these files is determinant on the file system used. For example, a USB drive formatted using the basic Linux file system (ext4) is inaccessible on a Windows computer. Let's show you ways to find out your Linux file system type. Most of them are commands that are executed on the Linux Terminal.

-Advertisement-

Any Operating system in the market whether its Windows, Linux, Unix, macOS, and any other, must be able to access and manage files and data on storage devices.

How an operating system accesses and manages these files is determinant on the file system used. For example, a USB drive formatted using the basic Linux file system (ext4) is inaccessible on a Windows computer. 

A lot of Linux distributions support quite a variety of file systems. They include ext, ext2, ext3, ext4, hpfs, iso9660, JFS, minix, msdos, ncpfs nfs, NTFS, proc, Reiserfs, smb, sysv, vfat, XFS, xiafs, and many more. 

With Linux operating systems, every data is configured as a file, from text data, images, device drivers, and many more. Every file system is divided into two parts; User data, which contains file system information and metadata, which holds the inode information.

-Advertisement-

The inode(metadata) holds information like Filename, type of file, file-permission, file-owner, Group-name, file-size, time-created, modified-time, time-deleted, hard-link, and soft-link, location in the directory hierarchy, etc..

Ways to find out your Linux system’s file type

In this post, we will put our focus on the Linux file systems. We will discuss ways that you can use to find out your Linux file system type. Most of them are commands that are executed on the Linux Terminal. Our distro of choice is Ubuntu 19.04 (Disco Dingo) and Fedora. 

1. The DF command

The df Linux command stands for Disk File-system. DF command alone displays the disk space utilization on your operating system. However, several parameters can be added to give it a lot more functionality. Execute df –help to see all of the parameters available. 

To display the file system, you will need to include the -Th parameter. In case you need elevated privileges, add the sudo command.

-Advertisement-
fosslinux-tuts:~$ sudo df -Th

df -Th command

The file system-type is listed under the Type column. You can also use it with a combination of other commands like grep to get detailed information. For example, to know the file system of all device (/dev) files, execute the command below.

fosslinux-tuts:~$ sudo df -Th | grep dev
-Advertisement-

fsck -N Grep dev
fsck -N Grep dev

Alternatively, use the df command to display the file system of a specific device. For example, the df command below prints the file system of the partition holding your current operating system. 

fosslinux-tuts:~$ df -Th /boot

df -Th_boot command
df -Th_boot command

2. The FSCK command

The fsck command checks the Linux file system and attempts repairs in case of an issue. However, with an additional parameter -N and the device path, it shows you the file system type.

fosslinux-tuts:~$ fsck -N /dev/sda

fsck -N _dev_sda
fsck -N _dev_sda

fosslinux-tuts:~$ fsck -N /dev/sdb1

fsck _N dev_sdb1
fsck _N dev_sdb1

3. The lsblk command

The lsblk command displays all the necessary information about all block devices present or a specific device depending on the path used. lsblk command gathers information by reading the sysfs filesystem and udev db. To display the file system type with lsblk, we will add the -f parameter.

Execute the command lsblk -f or lsblk -fs

fosslinux-tuts:~$ lsblk -f

lsblk -f command
lsblk -f command

4. The mount command

The mount command is used to load a file system in a Linux operating system. Other than that, it loads a remote file system or loads an ISO image. 

fosslinux-tuts:~$ mount | grep "/dev"

mount | grep "^dev"
mount | grep “^dev”

5. The blkid command

The blkid command displays the block device information, i.e., filesystem or swap. You will need to add the device label when using the blkid command.

fosslinux-tuts:~$ blkid /dev/sda

blkid _dev_sda1
blkid _dev_sda1 command

6. The file command

The file command determines the type of a file in a Linux system. It displays all the information about a given file. See the below example:

fosslinux-tuts:~$ file DSC_0627.JPG

file Image_File commmand
file Image_File command

To determine the disk file system, we will need to add the -s parameter. 

fosslinux-tuts:~$ file -sL /dev/sda1

file -sl _dev_sda1 command
file -sl _dev_sda1 command

Note, the file command might require elevated privileges; in such a case, use the sudo command.

fosslinux-tuts:~$ sudo file -sL /dev/sdb1

sudo file -sL _dev_sdb1
sudo file -sL _dev_sdb1

That’s it! Those are six ways to use to identify the file system used on your Linux system. Is there another method we have not listed? Please let our readers know in the comment section below.

-Advertisement-
Arun Kumar
Arun did his bachelor in computer engineering and loves enjoying his spare time writing for FOSS Linux. He uses Fedora as the daily driver and loves tinkering with interesting distros on VirtualBox. He works during the day and reads anything tech at night. Apart from blogging, he loves swimming and playing tennis.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,638FansLike
361FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

Top 20 Git Commands with Practical Examples

If you are here reading this post, there is a high probability that you have heard or interacted with Github, and you now want to learn Git. Before we continue with showing you some of the cool Git commands, let's understand the difference between Git and GitHub.

Top 10 New Features in Linux Kernel 5.7

Linus Torvalds has announced the release of Linux Kernel 5.7 after seven weeks of development. The release announcement comes as a piece of exciting news as it brings a host of new features for the hardware manufacturers as well as the developers.

How to install CMake on Ubuntu

CMake is a cross-platform free and open-source software tool designed to build, test, and package the software. CMake uses a simple platform and compiler-independent configuration files to control the software compilation process.

How to install Lightworks on Ubuntu

Even though Linux may not get a native installer of video editing software like Adobe Premiere or Final Cut Pro, that doesn't mean there are no industry standards tools available. Lightworks is non-linear editing (NLE) video mastering app for Windows, Linux, and macOS. Installing it on Ubuntu is simple due to deb package availability.

How to install DaVinci Resolve on Fedora

Davinci Resolve is a professional application used for color correction, video editing, visual effects, and motion graphics. It is one of the extensively used software by movie industries located in Hollywood.

The 10 Best Programming Languages for Hacking

One of the significant entities we have in Cyber Security is Ethical Hacking (ETH). It is the process of detecting and finding flaws or vulnerabilities in a system that a hacker would exploit.

MUST READ

Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

CopyQ – Advanced clipboard manager for Linux

We have all had that moment when we copied a text, but we first needed another one, and in the process, lost the first one. If you're lucky, you can get it back quickly with a bit of work.

10 Best Screen Capturing Software for Linux

Do you want to make a video tutorial for YouTube or show-off your epic victory royale to your friends? Look no further — as we have compiled the 10 Best Screen Capturing Software for Linux. Whether you need to record your desktop screen or take a simple screenshot, FOSSLinux has got your back.

5 Best Music Players for Linux

For sure, there will be Linux users out there who cannot live without music. If you're one of those people, you would know how important it is to have a good music player installed on your computer system. In this article, we present to you the 5 Best Music Players for Linux, which will hopefully be able to satisfy each of our readers' needs.

What’s New in Ubuntu 20.04 LTS “Focal Fossa”

Ubuntu 20.04 LTS is out now! This is the successor to Ubuntu 18.04, which was released in April 2018 and still has three years of official support left. Code-named Focal Fossa, the new edition has all the bells and whistles included in it, making it one of the best Ubuntu releases yet. Let's find out more.