File system labels are not something you need to have in order to have a functioning Linux operating system, but they can make your computer easier to navigate when you have several disk partitions. In this post I'll show how to add or **edit a Linux file system label** for ext2, ext3, and ext4 disk partitions.
My netbook has 3 OS's installed; Windows XP, Linux Mint, and Xubuntu. Sometimes I want to view files located on one file system from one of the other operating systems. It's convenient to have these [file systems labeled][1], so I know which one to open to find the desired files.
It might be handy to first take a look at what file systems already have a label and which ones don't. You can view information about your files systems with the **blkid** command. You may need to run the command as root to see all of the information.
Now I can also check where certain file systems are mounted on my current system with **lsblk**.
lsblk
The output from my Linux Mint OS looks like this.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 149.1G 0 disk
|-sda1 8:1 0 3.9G 0 part
|-sda2 8:2 0 39.1G 0 part
|-sda3 8:3 0 9.3G 0 part /
|-sda4 8:4 0 1K 0 part
|-sda5 8:5 0 86G 0 part /home
|-sda6 8:6 0 1.4G 0 part [SWAP]
|-sda7 8:7 0 9.3G 0 part
As you can see from the output from **blkid** and **lsblk**, only my Windows partitions have labels. Looking at my file manager I see a generic title for one of the partitions.
Looking at the output from **lsblk** I can see that my Linux Mint installation is on /dev/sda3, my home partition is on /dev/sda5, and my Xubuntu installation is on /dev/sda7. I'm going to use [e2label][2] as root to assign labels to these partitions.