L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h
Download 7.3 Mb. Pdf ko'rish
|
linuxbasicsforhackers
- Bu sahifa navigatsiya:
- Mounting Storage Devices Yourself
Mounting and Unmounting
Most modern operating systems, including most new versions of Linux, automount storage devices when they’re attached, meaning the new flash drive or hard drive is automatically attached to the filesystem. For those new to Linux, mounting might be a foreign subject. A storage device must be first physically connected to the filesystem and then logically attached to the filesystem in order for the data to be made available to the operating system. In other words, even if the device is physi- cally attached to the system, it is not necessarily logically attached and avail- able to the operating system. The term mount is a legacy from the early days of computing when storage tapes (before hard drives) had to be physically mounted to the computer system—think of those big computers with spin- ning tape drives you might have seen old sci-fi movies. As mentioned, the point in the directory tree where devices are attached is known as the mount point. The two main mount points in Linux are /mnt and /media. As a convention, devices such as external USB devices and flash drives can be manually mounted at /mnt, but when automatically mounted, the /media directory is used (though technically any directory can be used). Mounting Storage Devices Yourself In some versions of Linux, you need to mount a drive manually in order to access its content, so this is a skill worth learning. To mount a drive on the filesystem, use the mount command. The mount point for the device should be an empty directory; if you mount a device on a directory that has subdi- rectories and files, the mounted device will cover the contents of the direc- tory, making them invisible and unavailable. So, to mount the new hard drive sdb1 at the /mnt directory, you would enter the following: kali >mount /dev/sdb1 /mnt That hard drive should then be available for access. If you want to mount the flash drive sdc1 at the /media directory, you would enter this: kali >mount /dev/sdc1 /media Filesystem and Storage Device Management 107 The filesystems on a system that are mounted at boot-time are kept in a file at /etc/fstab (short for filesystem table), which is read by the system at every bootup. Download 7.3 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling