Inscrivez-vous maintenant pour un meilleur devis personnalisé!

5 Linux commands for managing external drives - and how I use them

Sep, 24, 2024 Hi-network.com
Ryan McVay/Getty Images

I currently have five external drives attached to my System76 Thelio, each of which serves a different purpose. I have one to house virtual machines, another for music files, another for backups, one for photos and videos, and one for miscellaneous things. Using these ensures the drive housing my operating system never fills up, which can cause slow-downs and lockups. 

Also: Thefirst 5 Linux commands every new user should learn

Even if you have only one external drive, you'll want to know the Linux commands available to help you manage them -- especially when it comes to adding or removing those drives.

1. lsblk

The lsblkcommand comes in very handy when you need to know the name of a drive. If you want to permanently mount a drive (via the/etc/fstabfile) or want to format a drive, you have to know the name of that drive (such as /dev/sdb). To locate that name, there's no better command to use thanlsblk

Issue that command and you'll see a list of the drive names and the directories to which they are mounted. Anlsblklisting will look something like this:

sda               8:0    0 931.5G  0 disk

tag-icon Tags chauds:

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.