Mutual access between linux and windows

Source: Internet
Author: User
Article title: a summary of mutual access between linux and windows. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Smb is a bridge between linux and windows, so let's take a look at what smb is, its main function, and how to share and configure it through smb. At last, we also introduced how to mount the windows shared directory by using the mount command.

I. Samba introduction

Samba (SMB) is a network server used for sharing files between Linux and Windows. Samba can be used for sharing files between Windows and Linux, it is also used for file sharing between Linux and Linux. However, for file sharing between Linux and Linux, the Network File System NFS is better, and NFS also needs to set up servers;

We all know that each machine in the Windows network can be a file sharing server or a client, and Samba can do the same, for example, a Linux machine, if the Samba Server is mounted, it can act as a shared Server, and can also be used as a client to access Windows shared file systems in other networks, or other Linux Sabmba servers;

In Windows network, we can see the shared file function, we can directly use the shared folder as a local hard disk. In Linux, Samba is used to provide a shared file system to machines on the network. It can also be used to mount the sharing of other machines on the local machine; in a sense, this is different from FTP.

II. samba Server startup and server configuration files

<一> Samba has two servers: smb and nmb;

Smb is the main startup server of Samba, allowing other machines to know what the machine shares;

Nmb is used for parsing. it resolves the working group shared by this Linux machine and the netbios name under this working group. If you do not open the nmb server, you can only access it through an IP address, that is, you can enter the ip address of the linux computer in the windows IE browser to access the server, for example, \ 192.168.0.1 est, the computer name entered in linux cannot be accessed, for example, \ wangyh est.

Therefore, you must start the smb service after installing the samba server. The following are the commands for starting, viewing, and disabling an smb server:

1. In general, in the RPM package system, if Samba is installed in the RPM package, you can generally start the Samba server in the following ways;

[Root @ localhost ~] #/Etc/init. d/smb start

2. for all linux systems, the common method is to directly run smb and nmb. enter the terminal and place the samba directory under the root permission into the command line, but you need to know the directory where smb and nmb are located; if it is a self-compiled Samba, you should know the directory where it is stored;

For example, the directory where samba is located is/usr/sbin/smbd (nmbd), and the input for starting smb is as follows:

[Root ◎ wangyh:/home/wangyh] #/usr/sbin/smbd

[Root ◎ wangyh:/home/wangyh] #/usr/sbin/nmbd

3. check whether the samba server is running after startup. the command is as follows:

[Root ◎ wangyh:/home/wangyh] #/pgrep smbd

[Root ◎ wangyh:/home/wangyh] #/pgrep nmbd

4. disable the smb server. the command is as follows:

[Root ◎ wangyh:/home/wangyh] #/pkill smbd

[Root ◎ wangyh:/home/wangyh] #/pkill nmbd

[1] [2] [3] [4] Next page

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.