Home  >  Article  >  System Tutorial  >  How to access Windows files in Ubuntu How to access Windows folders in Ubuntu

How to access Windows files in Ubuntu How to access Windows folders in Ubuntu

WBOY
WBOYforward
2024-02-29 13:01:361108browse

php editor Xiaoxin today will introduce to you how to access Windows folders in Ubuntu. In daily use, sometimes we need to access Windows folders in Ubuntu system for file sharing or data processing. Through simple settings and operations, we can achieve interoperability between Ubuntu system and Windows folders. Next, let’s learn about the specific steps!

method one:

1. Under Window, create a shared folder and set the "Sharing" attribute. Right-click and select Share. In the pop-up menu, select the user to share with. Of course, you can also select everyone.

Ubuntu如何访问Windows文件 Ubuntu访问Windows文件夹的方法

2. Open the "Home Folder" on the Ubuntu computer, and then select "Connect to Server" under Network

Ubuntu如何访问Windows文件 Ubuntu访问Windows文件夹的方法

3. In the pop-up menu, enter "smb://windows ip" in the server address. For example, my Windows IP is 192.168.1.100.

Ubuntu如何访问Windows文件 Ubuntu访问Windows文件夹的方法

4. Then click "Link".

Ubuntu如何访问Windows文件 Ubuntu访问Windows文件夹的方法

Method Two:

1. The protocol used by Windows shared folders is SMB/CIFS. Therefore, you can use smbclient under Linux to operate on the command line. First install the dependent packages. Using mount.cifs requires the cifs-utils package (and the packages that cifs-utils depends on)

sudo apt install cifs-utils

2. Mount command

sudo mount.cifs //[address]/[folder] [mount point] -o user=[username],passwd=[pw]
sudo mount -t cifs //[address]/[folder] [mount point] -o user=[username],passwd=[pw]
sudo mount.cifs //[address]/[folder] [mount point] -o user=[username],passwd=[pw],uid=[UID]
sudo mount.cifs //[address]/[folder] [mount point] -o domain=[domain_name],user=[username],passwd=[pw],uid=[UID]

Address is the IP address of Windows, folder is the shared directory under Windows, mount is the empty directory corresponding to Windows under Ubuntu, username is the user under Windows when setting up folder sharing. If the user uses domain management (such as enterprise or Organization user), you need to set the domain; pw is the password of the corresponding user; UID solves the file attributes. If the UID is not set, the default is to do it under root. The method to check the UID of a user is: id -u [username]

3. Experiment:

1) My ubuntu

Ubuntu如何访问Windows文件 Ubuntu访问Windows文件夹的方法

2) My windows

Ubuntu如何访问Windows文件 Ubuntu访问Windows文件夹的方法

Ubuntu如何访问Windows文件 Ubuntu访问Windows文件夹的方法

The above is the detailed content of How to access Windows files in Ubuntu How to access Windows folders in Ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete