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 view the contents of img files in linux system

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

Share

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

In this issue, the editor will bring you about how to view the contents of img files in the linux system. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

You can think of an img file as a disk, a disk that exists in the binary form of the file.

There must be some partitions on the disk.

Therefore, the partition in the disk can be mounted directly by mount.

First, know that the img disk file corresponds to the starting location of the partition.

Use the partition program to view the partition information of img, such as the fdisk of the ubuntu linux system, or parted fdisk directly as follows, and then p print the partition information of the img file

Fdisk noogie.imgCommand (m for help): pDisk noogie.img: 79 MB, 79691776 bytes128 heads, 32 sectors/track, 38 cylinders, total 155648 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000 Device Boot Start End Blocks Id Systemnoogie.img1 * 32 155647 77808 c W95 FAT32 (LBA)

Where the star is 32, to convert: 32X512=16384B, this is very important, the following mount command in the parameter offset to use

Second, mount the partition

````sudo mount-o loop,offset=16384 noogie.img / mnt/ ```

This is how to view the contents of the img file in the linux system shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

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

Internet Technology

Wechat

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

12
Report