We know that between Windows systems, remote systems can be accessed directly by sharing directories. In fact, here is a remote file system mechanism provided by Windows, a kind of NAS protocol ——CIFS protocol. If it is a Linux system, there is another NAS protocol ——NFS protocol for remote access. So can these two NAS protocols be interoperable? the answer is negative. Although the two can not communicate, but the Linux system has the server and client implementation of the CIFS protocol, so whether Linux for Windows sharing or Windows for Linux sharing can be achieved with these existing implementations.
In contrast, is there an NFS client or server on Windows? There are also, but not commonly used, not detailed here.
This is mainly about using the CIFS protocol on Linux to explain how to implement a cross-file system between two systems, sharing across operating systems. According to the above description, there are two ways to achieve sharing. Linux serves as the server and client of CIFS. The following two ways to explain the operation steps and simple principles:
First, Samba software to share the Linux file system for Windows users
Samba software is hailed as the top 10 most The fifth place in the value of open source software. The way it is obtained is very easy, and the configuration is very simple to use. Let's take the fedora system as an example. Let's take a look at whether the local samba is installed. If the /etc/init.d/smb file exists, it means that the samba software has been installed. Otherwise, use the following command to install:
Copy content to the clipboard yum install samba
After the installation is complete, modify the configuration file, open: /etc/samba/smb.conf, add at the end of the file The following configuration:
Copying content to the clipboard [root]
This configuration means creating a share called root and sharing the root file directory “/” to the user. The username allowed to log in is root.
Then add the root user to the samba system, use the following command:
Copy content to the clipboard smbpasswd -a root
Follow the prompts to set the password for the root user.
Restart the samba service.
Copying content to the clipboard service smb restart
Checking if the smb process is already running:
Copying content to the clipboard root 1787 0.0 0.4 33068 4784 ? Ss 21:51 0:00 smbd
On the Windows client that needs to access the Linux system, open the Windows Explorer and type: \\\\192.168.1.110
in the address bar. It will be found that there is a shared root, double click access. , prompt for the user name and password, enter the previously configured root user and password to access. Here is the Samba software to implement the CIFS server, Windows resource management as a client to access the remote shared file system. To make it easier to use the file system, you can also map the share to a local drive letter, allowing the various tools on Windows to use that directory as if it were a local disk. All operations on this share on Windows will be synchronized to the Linux system in real time.
Second, Linux access to Windows sharing
The above method of using Samba is commonly used. There is also a Windows system is naturally a CIFS server and client, since the Windows system can share the directory for the Windows system, can the Linux system access these shares? The answer is yes, with support for mounting and accessing various file systems due to strong VFS support. The mount tool supports file systems that are attached to CIFS or even NTFS. If it is a Linux virtual machine on the Windows machine, you can directly share the local disk partition to the Linux system directly through the virtual machine management software. For example, the Linux system can be mounted according to the file system type of the Windows disk partition. This scheme is not detailed here.
Enter the topic of this paragraph, first we need to share a Windows directory:
The following Windows XP as an example, Windows 7 did not verify, should be similar. Before sharing, you first need to ensure that the server service of the Windows system is in the startup state, as shown below:
Select the directory to be shared, right click, property, select “share” Page, as shown below:
Configuring Share
Select to share this folder on the network and specify the share name. Select whether to allow remote users to modify the folder as needed. This folder is then shared for remote access.
Mounting the share under Linux:
Copying content to the clipboard [root@f2 ~] # mount -t cifs -o username = " Test " //192.168.1.100/sourcecode /root /sourcecode
Enter the password for the specified user as required.
At this point, the shared sourcecode directory for Windows is already mounted on the Linux system. The Linux system can access the directory as if it were a local directory.
This method should be a better way to access, because in general, the files and workspaces we operate on Windows are above, only a few times, need to compile and debug on Linux. But it is a bit more troublesome to use. Note that there has been a problem with the inability to transfer data between the Windows system and the virtual Linux system, because the Windows system firewall is not turned on.
Through the above two methods to solve the problem of how to achieve mutual access between Windows and Linux file system, I hope to help everyone, thank you for reading.
What should I do if Win10 installs the printer driver with error code 0xc000007b? Recently, there ar
u disk win10 installation tutorial to slightly ~ The following will demonstrate the use of u disk to
What should I do if the win10 system is not working? If the win10 user reinstalls the system or repl
October 12th news. It was reported that in the first anniversary update of Win10 Mobile, the bottom
Win10 latest professional version of Build 10551 system screenshot exposure
How to update the Win10 th2 official version of Build 10586?
Win8.1 system with IE11 fixed the website to the start screen to achieve a key to open
Microsoft: Win10 new Edge browser will support WebM format
How to edit video in win10? Win10 uses the tutorial of photo editing video with its own
Repair method for the built-in administrator account of Win10 system is disabled
How to use the u disk to install win7 and xp system installation tutorial detailed
Win10 desktop icon shield removal method diagram
Win7 32-bit 4g memory available memory only 2g to 3g how to solve?
Enterprise application case of Windows2003 domain
Windows 7 all new shortcuts list
Coming soon to develop the latest version of Win8 Build 8370 exposure
How to open a QQ webpage using the default browser under Win10?
Automatic maintenance of Windows XP operating system
How to quickly crack rar decompression password in Win8/win8.1 system
Win8 system IE browser how to achieve full screen browsing page
Modify the X-Cache in Squid's Header to Powered-By-LinuxTone
Ways to improve the speed and performance of Windows 7 systems