0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

WindowsとLinuxでファイル共有してみた。

Posted at

はじめに

こんにちは、山田です。
今回は、CIFSでWindowsとLinuxでファイル共有するについて記載していきます。
image.png

Windows共有フォルダの作成

①:今回はCドライブに、cifsフォルダを作成してそれを共有フォルダにします。
image.png
②:cifsフォルダ作成後、プロパティを開きます。
image.png
③:共有をクリックして、共有するユーザーを選択する。
image.png
④:テスト用にcifsフォルダ直下にtest.txtを作成しておく。
image.png

LinuxでCIFSマウント

①:cifs-utilをインストールする。

yum -y install cifs-utils

②:マウントポイントを作成する。
今回は/cifsをマウントポイントとする。

mkdir /cifs

③:Windows共有フォルダをマウントする。

mount.cifs  -o user=test-user,password=P@ssw0rd //10.1.0.110/cifs /cifs

④:test.txtをコピーする。

cd /cifs
cp test.txt /tmp  #test.txtを/tmpにコピーする。
cd /tmp           #コピーできているかlsコマンドを打ち確認する。
ls             #以下のようにtest.txtがコピーされていればOK。
test.txt
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?