O'Reilly logo

CompTIA® Linux+ Certification, Powered by LPI, Student Manual by Axzo Press

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

338 CompTIA Linux+ Certification, Powered by LPI
Topic C: Removable storage
This topic covers the following CompTIA exam objectives for Linux+ [Powered by
LPI] Certification, LX0-101 and LX0-102 exams.
# Objective
104.1 Create partitions and filesystems
Use various mkfs commands to set up partitions and create filesystems such as:
ext2
ext3
vfat
104.3 Control mounting and unmounting of filesystems
Manually mount and unmount filesystems
Configure filesystem mounting on bootup
Configure user mountable removeable filesystems
The following is a partial list of the used files, terms, and utilities:
/etc/fstab
/media
mount
umount
110.1 Perform security administration tasks
Basic sudo configuration and usage
The following is a partial list of the used files, terms, and utilities:
sudo
su
Mounting removable storage
Explanation In Windows, each drive gets a letter identifier and contains its own root directory and
directory hierarchy. When you plug in a USB drive or insert a disc into your optical
drive, your system assigns that storage device a drive letter. You must reference the file
letter to access the new file system.
With Linux, however, you merge the file systems into one overall hierarchy by
mounting the new device. Instead of having its own identifier and directory hierarchy,
the removable storage device’s contents are made accessible as if they were located in
some existing directory on your computer.
Automatic mounting
Modern versions of Linux, particularly those configured for desktop (end-user) use
automatically mount some types of removable storage media. For example, if you insert
a CD or plug in a USB drive, Debian and Ubuntu (and surely others) automatically
mount the media for you. These operating systems even add an icon to the desktop to
make accessing the contents as simple as double-clicking.
File and directory management 339
Manually mounting volumes
In older versions of Linux and those configured for server roles, you must manually
mount file systems using the
mount command. You use the following syntax to mount
removable storage devices:
mount -t type device_file mount_point -o options
File system types
The first argument you need to specify with the
mount command is the file system type.
The
-t type option with mount is not strictly required. However, for a few file
systems, you must use it. The reason for this is that, for those file systems, you should
use a different mount program. However, by adding the
-t type option, the mount
command calls this separate program for you automatically.
You can also specify multiple possible file systems in a single command by entering
them as a comma-separated list without spaces. The following table lists common file
system types you might use with the
mount command.
Filesystem type Use this when mounting
ext2 or ext3
Hard disk drives formatted with the extended file system types.
iso9660
CD-ROM discs (sometimes also DVD discs) formatted with the ISO
9660 file system format.
udf
DVD discs and CD-ROM discs formatted with the Universal Disk
Format, also known as the ISO/IEC 13346 standard. This format is
largely replacing ISO 9660, because it supports larger files and
volumes.
usbfs
USB drives formatted with the extended (virtual) FAT (file allocation
table) file system type.
nfs or nfs4
Network drives available through the Network File Sharing (NFS)
system.
smbfs
Network drives, notably Windows Shares, available on the network.
hfs
Floppy disks and CD-ROMs formatted with the Macintosh HFS file
system.
msdos
Floppy disks formatted with the historic MS-DOS FAT file system
type.
vfat
Floppy disks formatted with the extended (virtual) FAT file system
type.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required