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

Jack Wallen introduces new Linux customers to the mount command and how you can use it to mount an exterior drive to the interior file system.


Picture: Jack Wallen

Linux is able to doing all types of wonderful issues, a few of which no different working system on the planet can do. 

It is also able to dealing with some very primary duties. One such process is mounting file programs (comparable to exterior drives) to the filesystem. This can be a essential function, in any other case, you would not have the ability to both increase your storage or connect exterior information drives. 

SEE: 5 Linux server distributions try to be utilizing (TechRepublic Premium)

In case you’re working with a distribution of Linux that features a desktop GUI, including exterior drives is fairly easy. However what in the event you’re utilizing a GUI-less server? For that, you will have to make use of the mount command. Mount does precisely what you suppose it does, it mounts an exterior drive to your inner filesystem. 

However it’s not precisely that straightforward. First off, it’s a must to have a listing on the interior file system to function the mount level. You possibly can’t merely mount, say, /dev/sdb to the basis file system. 

You would, nevertheless, create a brand new listing, say information with the command sudo mkdir /information. You’d then need to ensure that no matter consumer or group that would wish to make use of the listing has entry utilizing the chown command (as in sudo chown -R :writers /information) after which give the group write entry with the chmod command (as in sudo chmod -R g+w /information). 

SEE: Linux 101: Learn how to execute instructions from throughout the nano textual content editor (TechRepublic) 

As soon as you have completed that, you may have a mount level that may home the exterior drive. You then want to search out out the place the drive is positioned, which could be completed with the command lsblk. Discover the drive identify related to the disk and mount it with the command sudo mount NAME /information (The place NAME is the identify related to the drive, comparable to /dev/sdb). 

At this level, every thing housed in your exterior drive will seem in /information. 

And that, my mates, is the fundamentals for utilizing the mount command. To search out out extra particulars on this beneficial software, ensure that to learn the person web page with man mount. 

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the newest tech recommendation for enterprise execs from Jack Wallen.

Additionally see

Recent Articles


Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox