I LOVE CLI. There’s nothing more satisfying than bypassing and evading a barrage of colorful windows that get rendered on screen and moving the mouse cursor to click button 1 then button 2 WITH a simple command with parameters and arguments in the command-line interface. So naturally, I am overjoyed when I learn some useful (what I would consider fancy and elegant, but useful seems a more universally practical connotation) cli techniques.

Awesome things Learned in Linux:

sudo fdisk -l

fdisk is the partition table manager in linux. So you can see all internal and external drives AND their partitions (and their sisters and their mothers and their aunts…don’t ask what that means because I don’t know) with fdisk. VERY useful for checking out the location, labels (names), file system, and/or partitions of drives.

ntfslabel(example: ntfslabel /dev/sdc1)

ntfslabel checks the label of a drive formatted using NTFS file system. Then you simply change the drive label with

ntfslabel(example: ntfslabel /dev/sdc1 external_drive_200gb)

To do the above label namechange of a drive in

ext2, ext3, or ext 4, use

e2label (with the same ) format.

for FAT16/FAT32,

sudo mlabel -i-s ::

will check the label. A little more cryptic with the FAT file system.

and then actually changing the label is

sudo mlabel -i ::

Oh and one other very nifty command is

blkid

You can unplug and plug in an external hard drive to remount the partitions you just renamed, but blkid saves you from unplugging and replugging. A neat nifty command, imho!

Well that’s it for :
fdisk – accessing partition table information
ntfslabel or e2label or mlabel – accessing and changing label information on devices in NTFS, ext2/3/4, or FAT16/32, respectively.
blkid – automatically remounting attached external hard drives.

Great stuff with the CLI!

About these ads

About V.P.

meh meh.

One response »

  1. [...] Linux Geekoid: Code, webdev, CLI, OSes Assisting your edification in the important stuff: Code, gnu/linux ubuntu, webdev, CLI, OSes, Python Skip to content HomeAbout ← Renaming Hard Disk Partition from Command Line Interface [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s