Ubuntu 20.04 smb
时间: 2023-12-07 20:00:42 浏览: 28
SMB (Server Message Block) is a protocol used for sharing files, printers, and other resources between computers on a network. Here are the steps to set up SMB on Ubuntu 20.04:
1. Install Samba:
```
sudo apt update
sudo apt install samba
```
2. Create a directory to share:
```
sudo mkdir /home/<your-username>/smb_share
```
3. Edit the Samba configuration file:
```
sudo nano /etc/samba/smb.conf
```
4. Add the following lines to the end of the file:
```
[smb_share]
path = /home/<your-username>/smb_share
read only = no
guest ok = yes
```
Replace `<your-username>` with your actual username.
5. Save and exit the file.
6. Restart the Samba service:
```
sudo service smbd restart
```
7. Open the file manager and navigate to `smb://localhost/smb_share` to access the shared directory.
Note: If you want to share the directory with other computers on the network, you may need to configure the firewall and Samba user accounts accordingly.