SSブログ

Windows共有フォルダのマウント [Linux]

CentOSにWindows共有フォルダをマウントする方法について[るんるん]

1.マウントフォルダを作成する

今回は仮に/mntフォルダ下にshareフォルダを作成。

# mkdir /mnt/share
GUI操作で作成してももちろん問題なし[ひらめき]


2.Windows共有フォルダをマウントする

# mount -t cifs -o user=user_name,password=pwd //WinPC_name/共有フォルダ /mnt/share

user_name:ユーザ名
pwd:パスワード
//WinPC_name:共有フォルダを提供するPC名(IP-Address)
/共有フォルダ:共有フォルダ名
/mnt/share:マウント先のフォルダ


以下のエラーが出る場合はcifs-utilsがインストールされていない可能性が高い[ひらめき]

mount: wrong fs type, bad option, bad superblock on //WinPC_name/共有フォルダ,
  missing codepage or helper program, or other error
  (for several filesystems (e.g. nfs, cifs) you might
  need a /sbin/mount.<type> helper program)

  In some cases useful info is found in syslog - try
  dmesg | tail or so.


cifs-utilsのインストールは以下。

# yum install cifs-utils


3.不要になったらマウントを解除する

# umount /mnt/share


以上、CentOSにWindows共有フォルダをマウントする方法についてでした。
nice!(0)  コメント(7)  トラックバック(0) 
共通テーマ:日記・雑感
Google Play で手に入れよう

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。