Mount the iso file in linux

Как смонтировать файл образа ISO в Linux

How to Mount ISO File on Linux

В этом руководстве мы объясним, как монтировать файлы ISO в Linux.

Файл ISO — это архивный файл, который обычно содержит полный образ CD или DVD. Например, большинство операционных систем, таких как Windows, Linux и macOS, распространяются как образы ISO.

Файлы ISO могут быть извлечены с использованием популярных архивных программ, смонтированы на петлевом устройстве и записаны на флэш-накопитель USB или чистый компакт-диск.

Как смонтировать файлы ISO с помощью командной строки

Команда mount позволяет прикреплять (монтировать) файлы ISO в определенной точке монтирования в дереве каталогов.

Инструкции в этом разделе должны работать с любым дистрибутивом Linux, включая Ubuntu, Debian и CentOS.

Начните с создания точки монтирования, это может быть любое место, которое вы хотите:

Смонтируйте файл ISO в точку монтирования, введя следующую mount команду:

Здесь важен -o loop вариант. Он сообщает команде для сопоставления устройства цикла с указанным файлом ISO и монтирует это устройство в указанной точке монтирования.

Не забудьте заменить /path/to/image.iso путь к файлу ISO.

Чтобы просмотреть содержимое ISO-образа, используйте ls команду:

Вы также можете открыть файловый менеджер для просмотра содержимого ISO.

Размонтируйте файл ISO с помощью umount команды, за которой следует каталог, куда был смонтирован образ:

Если файловая система используется, umount команда не сможет отсоединить файловую систему.

Монтирование файлов ISO с помощью Gnome

Если вы используете дистрибутив Linux, в котором в качестве среды рабочего стола используется Gnome, вы можете смонтировать файл ISO, используя приложение монтирования образа диска Gnome.

Найдите файл ISO, который вы хотите смонтировать, и щелкните по нему правой кнопкой мыши. В контекстном меню выберите опцию «Открыть с помощью образа диска».

После того, как образ смонтирован, на рабочем столе должен появиться значок устройства. Дважды щелкните по нему, и откроется файловый менеджер Gnome.

Чтобы демонтировать файл ISO, щелкните правой кнопкой мыши значок устройства и выберите «демонтировать».

Вывод

В Linux вы можете монтировать файлы ISO с помощью mount команды. Пользователи настольных компьютеров могут использовать графические инструменты, такие как Gnome Disk Image Mounter.

Источник

How to Mount and Unmount an ISO Image in RHEL/CentOS/Fedora and Ubuntu

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 have .ISO extension has defined format name taken from the ISO 9660 file system and specially used with CD/DVD Rom’s. In simple words an iso file is a disk image.

mount and unmount iso images in linux

I have seen most of the Linux operating system that we download from the internet are .ISO format. Typically an ISO image contains installation of software’s such as, operating system installation, games installation 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 in burning them on to CD/DVD.

Читайте также:  Windows 10 нет знака звука

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

To mounting an ISO image on Linux (RedHat, CentOS, Fedora or Ubuntu), you must be logged in as “root” user or switch to “sudo” and run the following commands from a terminal to create a mount point.

Once you created mount point, use the “mount” command to mount an iso file called “Fedora-18-i386-DVD.iso“.

After the ISO image mounted successfully, go 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 an Fedora-18-i386-DVD.iso image would look like this.

How to Unmount an ISO Image

Simply run the following command from the terminal either “root” or “sudo” to unmount an mounted ISO image.

Where Options
  1. -t : This argument is used to indicate the given filesystem type.
  2. ISO 9660 : It describes standard and default filesystem structure to be used on CD/DVD ROMs.
  3. -o : Options are necessary with a -o argument followed by a separated comma string of options.
  4. loop: The loop device is a pseudo-device that often used for mounting CD/DVD ISO image and makes those files accessible as a block device.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

Mounting an ISO Image in Linux

You can easily access an ISO image of a CD or DVD (e.g. RHEL DVD) from the command line in Linux.

To access an ISO disc image, you have to create a mount point (empty folder that will be used as a root filesystem) and mount an ISO file to it.

In this article, i’ll show how to Mount and Unmount an ISO file from the Linux Command Line (CentOS, RHEL, Fedora, Ubuntu, Debian, Mint etc.).

To mount an ISO image in Linux, you must be a root or use sudo.

Create a Mount Point for ISO Image

A mount point – is a directory (typically an empty folder) from which the content of an ISO disc image will be accessible.

Create a mount point:

Mount an ISO File in Linux

Mount an ISO file /home/user/disk.iso to the mount point /mnt/mount_point :

After ISO disk is mounted, you will receive the following message: ‘mount: warning: /mnt/mount_point seems to be mounted read-only‘.

You can ignore it, because according to the ISO 9660 standard, ISO images are always mounted in read-only mode.

Verify that ISO File is Mounted

List mounted devices to verify that ISO image has successfully been mounted:

Читайте также:  Memory management windows 10 ошибка при перезагрузке

Below you should see a line like the following:

Now you can access the mount point and list the files stored on the ISO disk image:

Unmount an ISO File in Linux

Use the following command to unmount an ISO disc image:

Источник

3 Ways to Extract and Copy Files from ISO Image in Linux

Let’s say you have a large ISO file on your Linux server and you wanted to access, extract or copy one single file from it. How do you do it? Well in Linux there are couple ways do it.

For example, you can use standard mount command to mount an ISO image in read-only mode using the loop device and then copy the files to another directory.

Mount or Extract ISO File in Linux

To do so, you must have an ISO file (I used ubuntu-16.10-server-amd64.iso ISO image) and mount point directory to mount or extract ISO files.

First create an mount point directory, where you will going to mount the image as shown:

Once directory has been created, you can easily mount ubuntu-16.10-server-amd64.iso file and verify its content by running following command.

Mount ISO File in Linux

Now you can go inside the mounted directory (/mnt/iso) and access the files or copy the files to /tmp directory using cp command.

Copy Files From ISO File in Linux

Note: The -r option used to copy directories recursively, if you want you can also monitor progress of copy command.

Extract ISO Content Using 7zip Command

If you don’t want to mount ISO file, you can simply install 7zip, is an open source archive program used to pack or unpack different number of formats including TAR, XZ, GZIP, ZIP, BZIP2, etc..

Once 7zip program has been installed, you can use 7z command to extract ISO file contents.

7zip – Extract ISO File Content in Linux

Note: As compared to Linux mount command, 7zip seems much faster and smart enough to pack or unpack any archive formats.

Extract ISO Content Using isoinfo Command

The isoinfo command is used for directory listings of iso9660 images, but you can also use this program to extract files.

As I said isoinfo program perform directory listing, so first list the content of ISO file.

List ISO Content in Linux

Now you can extract a single file from an ISO image like so:

Note: The redirection is needed as -x option extracts to stdout.

Extract Single File from ISO in Linux

Well, there are many ways to do, if you know any useful command or program to extract or copy files from ISO file do share us via comment section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

Источник

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.

Читайте также:  Лучший легковесный дистрибутив linux

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:

Also read: The 7 Best ISO Mounting Software for Various OSes

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.

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.

Источник

Оцените статью