Linux Mount Windows host __linux

Source: Internet
Author: User

I'm used to browsing the code with the source insight under windows and then compiling it under Linux, but it's a problem how the problem of modification can be used from Linux.
Always used to pass the FTP, but the changes are frequent use is still very troublesome. Then suddenly found a very good way from the Internet, is in Linux
Under the windows of the hard drive, so that on Linux to use the same as the local hard drive can be compiled directly, the modification can be.


The method is as follows:

Share folders that need to be allowed to access under Windows

Then under Linux: Use the CIFS type Mount Mount-t cifs//192.88.88.11/www/home/www-o USERNAME=SHARE,PASSWORD=SHARE,RW

The user name and password can be written casually.

by the way, introduce: Fstab

If you want to boot up on mount, you can write to/etc/fstab:

Fstab interpretation

From left to right:

/dev/device mount-point type rules dump fsck

1. The first item is the physical location of the storage unit you want to mount, such as HDB or/DEV/HDA7 as in the previous example.

2. Mount-point: Mount point. For example, hang the/dev/hda1 under/mnt/mywinc.

3. Type:ext3, VFAT, ... Is the type of file system to hang.

4. Rules:

Auto: Post automatic hook up;

Default, Noauto: Power-on does not automatically hook up;

Nouser: Only root can be hung;

RO: Read-only hook;

RW: readable and writable hooks;

User: Any users can hook up;

5. Dump: Indicates whether the file system needs a dump backup, is the true and false relationship, 1 is required, 0 is not required;


6. fsck: Whether to check the file system through the FSCK Disk Detection tool at system startup, 1 is required, 0 is not required, 2 is skipped;

Mine is:

/dev/hda1/mnt/mywinc vfat default 0 0

Loading partitions in Fstab

Mkdir/mnt/win_c

Vi/etc/fstab

:::: Add:::::

/dev/hda1/mnt/win_c vfat default,pagecode=936,iocharset=cp936 0 0

/etc/fastab and doubts

1. Role of the Fstab document

File/etc/fstab Store file system information in the system. When the file is set correctly, you can load a file system with the "mount/directoryname" command, each file system corresponds to a separate row, and the fields in each row are separated by spaces or tab keys. At the same time, fsck, Mount, Umount and other commands are used in this program.

2. fstab file format

The following is an example of a/etc/fatab file:

Fs_spec fs_file fs_type fs_options fs_dump fs_pass

/DEV/HDA1/EXT2 Defaults 1 1

Fs_spec-This field defines the device or remote file system where the file system you want to load is located, and for a typical local block device scenario: The IDE device is generally described as/dev/hdaxn,x is the IDE device channel (A, B, or C), n represents the partition number, and SCSI device one is described as/ Dev/sdaxn. For NFS, the format is generally
Fs_file-This field describes the directory points that you want the filesystem to load, none for swap devices, and 40来 for spaces that contain spaces for the loaded directory name.

Fs_type-Defines the file system on the device, commonly common file types 猠 xt2 (common file types for Linux devices), VFAT (FAT32 format for Windows systems), NTFS, iso9600, and so on.

Fs_options-Specifies that the file system that loads the device is a specific parameter option that needs to be used, and that multiple parameters are separated by commas. For most systems, "defaults" can be used to meet your needs. Other common options include the following:

Option meaning

Ro loads the file system in read-only mode

Sync does not buffer the write operations of the device, which prevents the file system from being corrupted during an abnormal shutdown, but reduces the computer's speed

User allows normal users to load the file system

Quota enforces disk quota limits on this filesystem

Noauto no longer uses the MOUNT-A command (for example, when the system starts) to load the file system

Fs_dump-This option is used by the "Dump" command to check how quickly a file system should be dumped, and set this field to 0 if no dump is required

Fs_pass-This field is used by the fsck command to determine the sequence of file systems that need to be scanned at startup, the root file system "/" should have a value of 1 for the field, and the other file system should be 2. Set this field to 0 if the file system does not need to be scanned at boot time

3. Sample Files

#/etc/fstab

/DEV/HDA9 Swap Defaults 0 0

/DEV/HDA1/EXT2 Defaults 1 1

/dev/hda5/home ext2 Defaults 1 1

/DEV/HDA6/USR ext2 Defaults 1 1

/dev/hda7/usr/local ext2 Defaults 1 1

/dev/hda8/var ext2 Defaults 1 1

/dev/hdb/cdrom iso9660 noauto,user 0 0

NONE/PROC proc Defaults 0 0

None/dev/pts devpts gid=5,mode=620 0 0

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.