Linux 101: What is the mount command and how do you use it?

3 years ago 401

Jack Wallen introduces caller Linux users to the equine bid and however to usage it to equine an outer thrust to the interior record system.

linuxhero3.jpg

Image: Jack Wallen

Linux is susceptible of doing each sorts of astonishing things, immoderate of which nary different operating strategy connected the satellite tin do. 

It's besides susceptible of handling immoderate precise basal tasks. One specified task is mounting record systems (such arsenic outer drives) to the filesystem. This is simply a important feature, otherwise, you wouldn't beryllium capable to either grow your retention oregon connect outer information drives. 

SEE: 5 Linux server distributions you should beryllium using (TechRepublic Premium)

If you're moving with a organisation of Linux that includes a desktop GUI, adding outer drives is beauteous simple. But what if you're utilizing a GUI-less server? For that, you'll request to marque usage of the equine command. Mount does precisely what you deliberation it does, it mounts an outer thrust to your interior filesystem. 

But it's not precisely that simple. First off, you person to person a directory connected the interior record strategy to service arsenic the equine point. You can't simply mount, say, /dev/sdb to the basal record system. 

You could, however, make a caller directory, accidental information with the bid sudo mkdir /data. You would past privation to marque definite immoderate idiosyncratic oregon radical that would request to usage the directory has entree utilizing the chown bid (as successful sudo chown -R :writers /data) and past springiness the radical constitute entree with the chmod bid (as successful sudo chmod -R g+w /data). 

SEE: Linux 101: How to execute commands from wrong the nano substance editor (TechRepublic) 

Once you've done that, you person a equine constituent that tin location the outer drive. You past request to find retired wherever the thrust is located, which tin beryllium done with the bid lsblk. Find the thrust sanction associated with the disk and equine it with the bid sudo equine NAME /data (Where NAME is the sanction associated with the drive, specified arsenic /dev/sdb). 

At this point, everything housed successful your outer thrust volition look successful /data. 

And that, my friends, is the basics for utilizing the equine command. To find retired much details connected this adjuvant tool, marque definite to work the antheral leafage with antheral mount. 

Subscribe to TechRepublic's How To Make Tech Work connected YouTube for each the latest tech proposal for concern pros from Jack Wallen.

Open Source Weekly Newsletter

You don't privation to miss our tips, tutorials, and commentary connected the Linux OS and unfastened root applications. Delivered Tuesdays

Sign up today

Also spot

Read Entire Article