Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to extract and copy files from ISO image under Linux system

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to extract and copy files from the ISO image under the Linux system, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.

Extract ISO Image File under Linux system

To complete this test, you need to have an ISO image file (I use the ubuntu-16.10-server-amd64.iso system image file) and the directory used to mount and extract the ISO image file.

First, create a mount directory to mount the ISO image file using the following command:

$sudo mkdir / mnt/iso

Once the directory is created, you can easily mount the ubuntu-16.10-server-amd64.iso system image file and view its contents by running the following command.

$sudo mount-o loop ubuntu-16.10-server-amd64.iso / mnt/iso $ls / mnt/iso/

Mount the ISO image in the Linux system

Now you can go to the mount directory / mnt/iso, view the files or use the cp command to copy the files to the / tmp directory.

$cd / mnt/iso $sudo cp md5sum.txt / tmp/ $sudo cp-r ubuntu / tmp/

Copy the files in the ISO image in the Linux system

Note: the-r option is used to recursively copy the contents of the directory. If necessary, you can also monitor the progress of the copy command.

Use the 7zip command to extract the contents of the ISO image

If you don't want to mount the ISO image, you can simply install a 7zip tool, a free and open source unzip software that compresses or decompresses files in different formats, including TAR, XZ, GZIP, ZIP, BZIP2, and so on.

$sudo apt-get install p7zip-full p7zip-rar [On Debian/Ubuntu systems] $sudo yum install p7zip p7zip-plugins [On CentOS/RHEL systems]

After the 7zip software is installed, you can use the 7z command to extract the contents of the ISO image.

$7z x ubuntu-16.10-server-amd64.iso

Use 7zip tool to extract files in ISO image under Linux system

Note: compared to Linux's mount command, 7zip is faster and smarter when compressing and decompressing files in any format.

Use the isoinfo command to extract the contents of the ISO image file

Although the isoinfo command is used to list the contents of the iso9660 image in the form of a directory, you can also use this program to extract the file.

As I said, the isoinfo program displays a list of directories, so list the contents of the ISO image file first.

$isoinfo-I ubuntu-16.10-server-amd64.iso-l

List the contents of the ISO file in Linux

Now you can extract the single file from the ISO image file as follows:

$isoinfo-I ubuntu-16.10-server-amd64.iso-x MD5SUM.TXT > MD5SUM.TXT

Note: because-x is unzipped to standard output, the specified file must be extracted using redirection.

Thank you for reading this article carefully. I hope the article "how to extract and copy files from the ISO image under the Linux system" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report