How to add or edit the volume label of a file system on Linux

Source: Internet
Author: User
Tags linux mint

The file system volume label is not required for the normal operation of the Linux operating system, but when you have several disk partitions, the file system volume label makes it easier to navigate to those disk partitions. In this article, I will show you how to add or edit the Linux File System volume tag in the ext2, ext3, and ext4 disk partitions.

My netbook has three operating systems: Windows XP, Linux Mint, and XUbuntu. Sometimes I want to view the file location of a file system on another operating system. It is very convenient to have a file system volume label, you can know which file system to open to find the desired file.

View the volume label of a Linux File System

First, let's take a look at which file systems have a volume label and which have not yet. You can use the blkid command to view your file system information. You need to run this command as root to view all information about the file system.

Sudo blkid-c/dev/null

The output information in my netbook is as follows.

/Dev/sda1: LABEL = "WINRE" UUID = "80AE-9D55" TYPE = "vfat"
/Dev/sda2: LABEL = "OS _Install" UUID = "E468676968673A06" TYPE = "ntfs"
/Dev/sda3: UUID = "012ff341-f854-4c4f-8bbd-bbc810121fe6" TYPE = "ext4"
/Dev/sda5: UUID = "ec0fe4d1-e21c-407d-8374-aa4b470519da" TYPE = "ext3"
/Dev/sda6: UUID = "ee275431-64b2-4f55-b958-4055147cdf4e" TYPE = "swap"
/Dev/sda7: UUID = "99feb5c5-25a6-47a3-aa2c-6d466c0094ab" TYPE = "ext4"

Now I can use the lsblk command to list a file system mounted to my current system.

Lsblk

The output information on my Linux Mint system is as follows.

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 1 K 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, on the blkid and lsblk command output information, only my Windows partition has a volume label. You can see that each partition has a common name in the browser File Manager.

Partitions without volume labels

Recommended reading:

Common commands for Linux file systems and file operations

Linux File System limits ulimit usage

Detailed explanation of file time attribute in Linux File System

The native exFAT driver has come to the Linux platform.

Install and configure an exFAT and NTFS hard drive mounted in Linux

Ubuntu/Xubuntu: read/write exFAT File System

Partitions In exFAT format can be read and written on Ubuntu.

Support for the new Microsoft File System exFAT in Linux

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.