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 /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.
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
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!