Share common system resources in Linux

Source: Internet
Author: User
Article Title: share common system resources in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

  Introduction:

In linux, how does one mount a CD image file, a mobile hard disk, a USB flash disk, Windows network sharing, and NFS network sharing?

Linux is an excellent open-source operating system, which can run on various computer systems, from large to small, with the increasingly mature and stable linux system and its unique advantages of open source code, linux has been widely used in the world. Nowadays, many enterprise computer systems are a hybrid system consisting of UNIX, Linux, and Windows systems. Data Exchange is often required between different systems. Next, based on my actual work experience, I will introduce how to mount a CD image file, a mobile hard disk, a USB flash disk, Windows network sharing, and UNIX NFS network sharing in linux.

  Mount command)

First, we will introduce how to use the mount command. The mount command has many parameters. Here we will focus on what we will use today.

Command Format:

       
          mount [-t vfstype] [-o options] device dir
       

Where:

1.-t vfstype specifies the type of the file system, which is usually not required. Mount automatically selects the correct type. Common types include:

CD or CD image: iso9660.

DOS fat16 File System: msdos.

Windows 9x fat32 File System: vfat.

Windows NT ntfs file system: ntfs.

Mount Windows File network sharing: smbfs.

Network Sharing for UNIX (LINUX) files: nfs.

2.-o options is used to describe the mounting method of a device or file. Common parameters include:

Loop: used to connect a file to the system as a hard disk partition.

Ro: mount the device in read-only mode.

Rw: the device is mounted in read/write mode.

Iocharset: Specifies the character set used to access the file system.

3. the device to be mounted.

4. mount point of the dir device on the system ).

  Attach a CD image file

Thanks to the huge advances in disk technology in recent years, new computer systems are equipped with large-capacity disk systems. In Windows, many people are used to making software and materials into disc image files and using virtual optical drives. This has many advantages: 1. It reduces the wear and tear of the optical drive; 2. It is not a problem that the hard disk capacity is huge to store dozens of disc image files, and it is very convenient to use as needed; iii. Hard Disk reading speed is much higher than the disk reading speed, and the CPU usage is greatly reduced. In fact, it is more convenient to create and use a CD image in a linux system than in a Windows system. You do not have to borrow any third-party software package.

1. Create a CD image file from the CD. Put the CD in the optical drive and execute the following command.

       
        
# Cp/dev/cdrom/home/sunky/mydisk. iso or # dd if =/dev/cdrom of =/home/sunky/mydisk. iso
       

Note: You can execute any of the above commands to make the current CD in the optical drive into a CD image file/home/sunky/mydisk. iso

2. Make the files and directories into a CD image file and execute the following command.

       
           #mkisofs -r -J -V mydisk -o /home/sunky/mydisk.iso /home/sunky/ mydir
       

Note: This command will make all the directories and files under the/home/sunky/mydir Directory into a CD image file/home/sunky/mydisk. iso, and the disc volume is marked as mydisk.

3. mount the disk image file)

       
           #mkdir /mnt/vcdrom
       

Note: create a directory for mount point)

       
           #mount -o loop -t iso9660 /home/sunky/mydisk.iso /mnt/vcdrom
       

Note: You can use/mnt/vcdrom to access all files in the disk image file mydisk. iso.

 

[1] [2] [3] [4] Next page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.