Linux Mount: Quickie

- Image via Wikipedia
The Linux mount command is used to mount a filesystem by assigning a mount point (such as a directory below the /mnt directory) to a hard disk partition or other disk device, such as a CD-ROM drive.
After the partition or device has been mounted, it can be accessed by application Linux software programs, utilities and commands.
Example of Using the Linux mount Command
For example, the following command:
$ mount /dev/cdrom /mnt/cdrom causes the device file named cdrom in the /dev directory to be mounted “onto” the cdrom directory below /mnt.
The cdrom directory becomes the “mount point” for the CD and this allows you to access the filesystem of the CD.
The files in the / (root) directory of the CD become accessible below the full path of /mnt/cdrom.
Listing the Contents of the Linux /dev System Directory Below The / (Root) Directory
Many of the important Linux system directories, such as the /dev directory, are located directly below the / (root) directory.
Now look at the contents of the /dev directory and find out what Linux uses it for.
Examples of Using the Linux ls Command to the List System Directories and the /dev Directory
The following command lists the contents of the / directory – from any directory. The “-l” option of the ls command is not required here.
$ ls / Notice the dev directory, which is below the / (root) directory in the full path of /dev.
Viewing the Contents (Directories and Files) in the /dev Directory Path
Now run the following command to see the contents of the /dev directory, without having to change directory.
$ ls /dev Example of Using the Linux nl Command To Number Lines of Output
The Linux nl (number line) command can be used to count and display the number of lines in a file or the output of a command.
In the folloinwg example, the output of the ls command is “piped” (with the vertical bar symbol) to the nl command to display a count of the output of the command.
$ ls -l /dev | nl This shows the device driver files for many different types of Linux hardware devices that are located in /dev and a count of the number of them.
Linux Commands Training Tips: On more current Linux systems, the mount command may not be required and your devices may automatically mount below the /media directory. For example, if you put a CD in your drive and it automatically appears on your Linux desktop, you do not need to use the mount command to do the steps in the command example above. The Linux ls command and dev system directory concepts covered here apply to ALL Linux distributions and versions, including Ubuntu, openSUSE, Debian, SUSE, Fedora, Slackware and Red Hat Linux.
By the way…do you want to learn exactly how to use Linux and run Linux commands for Linux System Administration and get real, practical Linux training experience by running hundreds of examples of Linux commands? Stay tune as I add more about Linux.
Other related articles:
- Mounting Partitions | Editing Linux Mount Points with /etc/fstab … – This tutorial explains how /etc/fstab and /etc/mtab reveal both potential and mounted partitions on the Linux server.
- Copy a Solaris Boot Drive to a New Disk | spiralbound.net – If you’ve ever gone to mirror a system drive with Solstice Disk suite, you know how frustrating it can be when you either don’t have any more slices to use for your meta database partitions, or all the space on the disk has already been …
- Forcing Sun Network Interfaces to 100/Full Duplex | spiralbound.net – Forcing Sun Network Interfaces to 100/Full Duplex. For one reason or another, many network switches don’t like to negotiate properly with the ethernet cards in Sun servers. This can result in a lot of headaches, and sometimes the …
- Hacking Jobo device « Simon Josefsson’s blog – I blogged earlier about buying the Linux-based Jobo Giga Vu Pro Evolution. On 2007-04-14 I asked about the source code, and on 2007-04-23 I received a reply pointing at this URL. I see now that the file can also be downloaded (much …
- Moving Large Directories on Solaris | spiralbound.net – Moving Large Directories on Solaris. When moving or copying really really large directories on Solaris, you can sometimes run into trouble, especially when some of the files in those directories are larger than 8 Gigabytes. …
- Backing Up with RsyncX – The Adventures of Systems Boy! – In an earlier post I talked generally about my backup procedure for large amounts of data. In the post I discussed using RsyncX to back up staff Work drives over a network, as well as my own personal Work drive data, to a spare hard drive. Today I’d like to get a bit more specific.
- Linux mount | FOX21.at: Free Software, Freeware, Perl, PHP, MySQL … – Linux, FS, FileSystem, Mount, mounten, Partition mounten, img, iso, iso9660, NTFS, Windows, Partition, Loop, SATA, Festplatte.
This entry was posted on Thursday, October 22nd, 2009 at 6:17 pm and is filed under Networking. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

October 22nd, 2009 at 9:37 pm
Understanding Linux Filesystems | Sekolah Linux Indonesia says:[...] you are want to become Linux administrator then you like to know more about linux mount as [...]
July 18th, 2010 at 2:14 am
Thanks for sharing. It is good information.
July 26th, 2010 at 2:40 pm
It is so cute, Although I do not know what is going on…
July 27th, 2010 at 1:02 pm
Great website: Do you agree that one of the finest bookkeeping software programs on the market is Intuit Quickbooks for everyday use. I am looking for some input on what to purchase. Thanks again!
July 31st, 2010 at 2:14 pm
but then, do they wanna study their future?
August 5th, 2010 at 2:32 am
I’m impressed!! Really informative blog post here my friend. I just wanted to comment & say keep up the quality work. I’ve bookmarked your blog just now and I’ll be back to read more in the future my friend! Also nice colors on the layout, it’s really easy on the eyes.
August 11th, 2010 at 3:52 am
Once you’ve picked a site (see previous answer), it is simply a matter of beginning to create: most of these services have their personal text editors, word processors in miniature.
August 17th, 2010 at 10:40 am
Keep up the good work. Everyone is opened to there opinion. Excellent blog here, i am still reading
August 17th, 2010 at 2:38 pm
Hey could I quote some of the material found in this post if I link back to you?
August 17th, 2010 at 8:33 pm
Great precise info, I’ve been searching on this topic for a while. Bookmarked and recommended!
August 18th, 2010 at 1:43 pm
It’s shocking how many information and news come out on a hourly basis.
August 18th, 2010 at 2:03 pm
Interesting article – I hope my comments are not spam
August 19th, 2010 at 4:03 am
I just needed to say that I found your blog via Goolge and I am glad I did. Keep up the good work and I will make sure to bookmark you for when I have more free time away from the books. Thanks again!