Home >System Tutorial >LINUX >Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

PHPz
PHPzforward
2024-01-05 16:38:201057browse

If we are doing corresponding development in the Ubuntu environment, sometimes we need to share the program we wrote with others, or copy it ourselves and make a backup copy. We are accustomed to using USB flash drives for copying, but this will be inconvenient if frequent copies are needed. Here is a better way to introduce to you: sharing through Samba server.

Samba is a free software that implements the SMB protocol on Linux and UNIX systems. It consists of server and client programs.

The Samba server builds a bridge between two different operating systems, enabling communication between Linux systems and Windows systems. Through the samba service under the Linux operating system, the Windows host can access shared files under Linux, providing great convenience to a wide range of Linux enthusiasts.

First, we need to install samba in the ubuntu environment.

Installation command, as follows:

sudo apt-get install samba smbfs smbclient system-config-samba

If it is Ubuntu 14.04 version, please install it with this command: sudo apt-get install samba samba-common system-config-samba python-glade2 gksu

samba: core component of samba.
smbfs: A file system that supports the SMB/CIFS protocol.
smbclient: samba client, access other machines.
system-config-samba: graphical interface configuration tool.

Graphic tutorial for installing Samba on Ubuntu

Configure Samba accordingly through the graphical interface:

1) Add user

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

2) Set the Linux shared directory and its permissions

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

3. Test usage

1) If a Windows host wants to access the shared directory of Ubuntu, the networks of the two systems must be able to ping, otherwise, access will not be possible. The picture below shows the ip of Ubuntu to ping Windows:

Graphic tutorial for installing Samba on Ubuntu

2) Obtain the ip of ubuntu and type: ifconfig in the terminal.

Graphic tutorial for installing Samba on Ubuntu

3) Access the samba shared directory and operate on the Windows host: Start-->Run-->\\10.220.x.x(ubuntu's ip)\share(share name):

Graphic tutorial for installing Samba on Ubuntu

4) Enter username and password:

Graphic tutorial for installing Samba on Ubuntu

5) Enter the shared directory:

Graphic tutorial for installing Samba on Ubuntu

Map Network Drive

In the future, when accessing the ubuntu shared directory, you must operate on the Windows host: Start-->Run-->\\10.220.x.x (ubuntu's ip)\share (share name), this will be very troublesome. Let me introduce you to a good method: mapping a network drive.

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

Graphic tutorial for installing Samba on Ubuntu

In the future, if we open my computer directly, we can see this shared directory and open it directly (provided that ubuntu has been turned on). If we no longer want to use it, we can also disconnect the network drive:

Graphic tutorial for installing Samba on Ubuntu

If there is a problem with the samba service, you can restart the service:

sudo service smbd restart

Okay, that’s it for this article. I hope you will support this site in the future.

The above is the detailed content of Graphic tutorial for installing Samba on 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