Linux and Windows are married

Source: Internet
Author: User
As a new thing, Linux attracts a lot of eyeballs, but whether it is quick and easy to share with Windows resources is a very important issue. As you know, you can use Network Neighborhood to share resources between windows, and you can use NFS for resource sharing between Linux. So, between Linux and Windows?
Linux can be used by Samba to meet the Windows host's complementarity. Samba uses the Client/server schema, executes the Samba client program, and can access shared resources on the Windows host, while running the Samba server allows the Windows host to access the shared resources on Linux. The following example, Red Hat 8.0, describes how to access windows shared resources in a Linux environment.
Installing Samba
If you are unsure whether the samba package is installed, you can query it in the terminal window by executing the following command:
$ RPM-QA | grep Samba
If the results of the query appear in the three packages shown in Figure 1, the Samba package is already installed.

Figure I: Query whether the Samba package is installed
If you have not installed the Samba package, you can insert the Red Hat 8.0 second installation CD and follow the steps below to install it (for example, in the KDE environment):
1. Click the main menu → system settings → "package" selected items, will open the Package Management dialog box.
2. Locate the Windows File server in the dialog box, make sure that the option is checked, and then click the Update button at the bottom of the dialog box, as shown in Figure 2.
3. Install the Samba package.

Figure Three: Installing the Samba Package
The whole process is very simple, and the system automatically detects dependencies between packages and does not have to worry about them at all.
Access windows in a command way
Once you've installed Samba, you'll be able to make it go well. Here's how to access windows shared resources using character commands.
1. Querying shared resources for Windows hosts
You can use the Smbclient-l windowshostname command to query shared resources for Windows hosts. For example, to query a shared resource on a Windows host named Peter, you can enter in the terminal window:
Smbclient-l Peter
And then you can enter. The exact use of this command is shown in Figure 3. This command allows you to accurately check the shared folders of the Windows host and support the Chinese file names well.

Figure three: Querying the shared resources of a Windows host
2. Shared directories to connect to Windows hosts
We can use the "smbclient//windowshostname/sharename" command to connect to a shared folder on a Windows host. If the shared folder requires a username and password, you can use the smbclient//windowshostname/sharename-u UserName command. For example, to connect to the shared directory share on the Windows host Peter, you can enter in the terminal window:

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.