- Как смонтировать ISO-файл в Linux
- Как смонтировать файлы ISO с помощью командной строки
- Монтирование файлов ISO с помощью Gnome
- Выводы
- How to Mount and Unmount an ISO Image in Linux
- How to Mount an ISO Image in Linux
- How to Unmount an ISO Image in Linux
- How To Mount ISO File In Linux?
- Mount ISO File with mount Command
- List ISO File Contents
- Unmount ISO File with umount Command
- Mount ISO File In GNOME Desktop
- How to Mount an ISO File in Linux
- Graphical way to mount ISO in Linux
- Use Command Line to mount ISO in Linux
- Unmount the ISO
Как смонтировать ISO-файл в Linux
Файл ISO — это архивный файл, который обычно содержит полный образ компакт-диска или DVD. Например, большинство операционных систем, таких как Windows, Linux и macOS, распространяются в виде образов ISO.
Файлы ISO можно извлечь с помощью популярных архивных программ, смонтировать на устройстве с петлей и записать на USB-накопитель или пустой компакт-диск.
В этом руководстве мы объясним, как монтировать файлы ISO в Linux.
Как смонтировать файлы ISO с помощью командной строки
Команда mount позволяет прикреплять (монтировать) файлы ISO в определенной точке монтирования в дереве каталогов.
Инструкции в этом разделе должны работать с любым дистрибутивом Linux, включая Ubuntu, Debian и CentOS.
- Начните с создания точки монтирования, это может быть любое место, которое вы хотите:
sudo mount /path/to/image.iso /media/iso -o loop
Монтирование файлов ISO с помощью Gnome
Если вы используете дистрибутив Linux, который использует Gnome в качестве среды рабочего стола, вы можете смонтировать файл ISO с помощью приложения для монтирования образа диска Gnome.
Найдите ISO-файл, который вы хотите смонтировать, и щелкните его правой кнопкой мыши. В контекстном меню выберите «Открыть с помощью Disk Image Mounter».
После подключения образа на рабочем столе должен появиться значок устройства. Дважды щелкните по нему, и откроется файловый менеджер Gnome.
Чтобы отключить файл ISO, щелкните правой кнопкой мыши значок устройства и выберите «Размонтировать».
Выводы
В Linux вы можете монтировать файлы ISO с помощью команды mount . Пользователи настольных компьютеров могут использовать графические инструменты, такие как Gnome Disk Image Mounter.
Если у вас есть какие-либо вопросы или отзывы, не стесняйтесь оставлять комментарии.
How to Mount and Unmount an ISO Image in Linux
An ISO image or .iso (International Organization for Standardization) file is an archive file that contains a disk image called ISO 9660 file system format.
Every ISO file has .iso an extension has a defined format name taken from the ISO 9660 file system and is specially used with CD/DVD ROMs. In simple words, an iso file is a disk image.
I have seen most of the Linux operating system images that we download from the internet are .ISO format. Typically an ISO image contains the installation of software such as operating system installation files, games installation files, or any other applications.
Sometimes it happens that we need to access files and view content from these ISO images, but without wasting disk space and time by burning them onto CD/DVD or USB drives using our tools.
This article describes how to mount and unmount an ISO image on a Linux Operating system to access and list the content of files.
How to Mount an ISO Image in Linux
To mount an ISO image on RedHat-based or Debian-based Linux distributions, you must be logged in as a “root” user or switch to “sudo” and run the following commands from a terminal to create a mount point.
# mkdir /mnt/iso OR $ sudo mkdir /mnt/iso
Once you created a mount point, use the “mount” command to mount an iso file called “Fedora-Server-dvd-x86_64-36-1.5.iso“.
# mount -t iso9660 -o loop /home/tecmint/Fedora-Server-dvd-x86_64-36-1.5.iso /mnt/iso/ OR $ sudo mount -t iso9660 -o loop /home/tecmint/Fedora-Server-dvd-x86_64-36-1.5.iso /mnt/iso/
Where Options
- -t – This argument is used to indicate the given filesystem type.
- ISO 9660 – It describes the standard and default filesystem structure to be used on CD/DVD ROMs.
- -o – Options are necessary with a -o argument followed by a separated comma string of options.
- loop -The loop device is a pseudo-device that is often used for mounting CD/DVD ISO images and makes those files accessible as a block device.
After the ISO image is mounted successfully, go to the mounted directory at /mnt/iso and list the content of an ISO image. It will only mount in read-only mode, so none of the files can be modified.
You will see the list of files of an ISO image, that we have mounted in the above command. For example, the directory listing of a Fedora-Server-dvd-x86_64-36-1.5.iso image would look like this.
total 21 dr-xr-xr-x 3 root root 2048 May 5 02:49 EFI -r--r--r-- 1 root root 2574 Apr 12 00:34 Fedora-Legal-README.txt dr-xr-xr-x 3 root root 2048 May 5 02:49 images dr-xr-xr-x 2 root root 2048 May 5 02:49 isolinux -r--r--r-- 1 root root 1063 Apr 12 00:32 LICENSE -r--r--r-- 1 root root 95 May 5 02:47 media.repo dr-xr-xr-x 28 root root 4096 May 5 02:49 Packages dr-xr-xr-x 2 root root 4096 May 5 02:49 repodata -r--r--r-- 1 root root 1118 May 5 02:49 TRANS.TBL
How to Unmount an ISO Image in Linux
Simply run the following command from the terminal either “root” or “sudo” to unmount a mounted ISO image.
# umount /mnt/iso OR $ sudo umount /mnt/iso
How To Mount ISO File In Linux?
ISO is a popular file format that is generally used to store optical media data like CDs, DVDs, etc. ISO files contain the image of a specific CD or DVD. Generally, operating systems, software, software bundles are stored inside ISO files. ISO is a file format and file system which is also defined as ISO 9660. ISO 9660 standard created in order to make every CD and DVD content compatible. The UDF is the next version of the ISO 9660 standard. UDF is backward compatible with the ISO 9660.
Mount ISO File with mount Command
The mount command is used to mount different disks and partitions with different file systems. As an ISO file is a file system defined as ISP 9660 or UDF we can use the mount command in order to mount ISO files. To mount the ISO file a mount point is required where the contents of the ISO represented. In the following example, the ISO file named ubuntu.iso mounted into cdrom directory located in the current user home directory. We provide the -o loop option and do not provide the sudo command. Following ISO mount operation does not require root privileges because the current user has access rights for his/her home directory.
mount -o loop /home/ismail/ubuntu.iso /home/ismail/cdrom
Generally physical CD-ROM and ISO files are mounted under the /mnt directory. The /mnt directory requires root privielges to mount or create directory. First we will create a directory named /mnt/iso to mount ISO file.
Now we can mount the ISO file but again we require the root privileges. We provide the sudo command.
sudo -o loop /home/ismail/ubuntu.iso /mnt/iso
By default the ISO file file system type is automatically detected by the mount command. But in some cases it may not work. The file system type of the ISO file can be specified explicitly. The -t iso9660 can be specified as the file system like below.
sudo -o loop -t iso9660 /home/ismail/ubuntu.iso /mnt/iso
List ISO File Contents
After mounting ISO file we can list the contents of the ISO file. We use the ls command to list mount directory contents. In the following example the ISO file is mounted under /mnt/iso .
Unmount ISO File with umount Command
The mounted ISO file can be unmounted by using the umount command. Just provide the mount directory of the ISO file to the umount command. In the following example, we unmount the /mnt/iso .
If the directory is its contents allready in use it can not be unmounted and return error about this.
Mount ISO File In GNOME Desktop
GNOME is a popular desktop environment used in Linux. It provides the tool named Disk Image Mounter which can be used to mount ISO files. First right-click to the ISO file like below. Select the “Open With Other Application” if the “Open With Disk Image Mounter” not listed.
In the following Select Application screen select the Disk Image Mounter. As the last step click to the Select button. This mounts the ISO file automatically.
After the ISO file mounted it listed in the File Manager menu side bar like below.
How to Mount an ISO File in Linux
ISO files are everywhere. They’re incredibly useful for a number of things, but you’ll most commonly find them as software installation images. ISOs are also commonly used for making backups and storing data.
Linux has a couple of great ways to manage ISO files. You can handle things from your graphical desktop, or you can work exclusively from the command line. Both have their upsides.
Graphical way to mount ISO in Linux
When you’re working with a physical disk with an ISO image on it, the graphical tools that come with your desktop environment are easily the simplest to work with.
Insert your disk into your computer’s disk drive. Open your desktop file manger, and look to the side of the window where the storage devices are listed. Before long, your disk should appear.
Click on your disk, and you’ll open the contents in the main body of the window. You’ll be able to read the files on the media and copy things onto your computer.
When you’re done, either right-click the disk on the device listing and unmount, or use the Eject icon, if there is one.
For an ISO file, most File Managers in Linux come with native ISO support. Most of the time you just need to right-click on the ISO file and select “Mount Archive” (or equivalent option).
And if you really need another application to handle the mounting, Furius ISO Mount is a useful software that you can use to mount ISO files graphically. It is available for most Linux distros.
In Ubuntu you can install with the command:
sudo apt install furiusisomount
Use Command Line to mount ISO in Linux
The command line offers a simple and direct way to mount an ISO on your system, too. It’s not as fast as the couple of clicks that it takes graphically, but it’s not complicated either. You can handle it with a single command.
While you can mount the ISO from a physical disk graphically, it’s much easier to mount an ISO file though the command line. That’s what this part of the guide is going to focus on.
Mounting an ISO is very similar to mounting any filesystem on Linux. There are a couple of flags that you’ll need to add in. You’re also going to need a directory to mount it to, so make one.
sudo mkdir /media/iso sudo mount -o loop -t iso9660 /path/to/file.iso /media/iso
That will mount your ISO file to the directory that you created.
The first flag to look at specifies the type of filesystem being mounted. In this case it’s an ISO. You specify it with the -t flag. In this case, it isn’t strictly necessary, but it’s better to be certain.
The -o flag is a generic options flag. It takes a bunch of different potential options, but in this case, you’re going to be using loop. The loop option tells Linux to use a virtual loopback interface in place of a physical device. Since the ISO isn’t an actual device with a listing in the “/dev” directory, adding this flag is necessary.
When you mount your ISO, you’ll get a warning message stating that the file was mounted in read-only mode. This is totally normal. An ISO is a snapshot. It’s not meant to be written and altered like a normal drive.
Unmount the ISO
Unmounting your ISO is very easy. This follows the exact same procedure as unmounting another drive.
Your system will unmount the file. Since ISOs are snapshots, you can mount it and return to where you were at any time.
Whether you’re mounting a physical disk on your computer or you’re working with ISO files and letting them behave like a virtual drive, managing ISOs in Linux is fairly simple. A lot of the simplicity comes from Linux’s Unix heritage. Because it handles everything as a file or directory, drives and ISO files are no different.
Nick is a freelance tech. journalist, Linux enthusiast, and a long time PC gamer.
Our latest tutorials delivered straight to your inbox