mount -aコマンドが機能するように/ etc / fstabを変更します。

mount -aコマンドが機能するように/ etc / fstabを変更します。

したがって、Linuxシステムの新しいイメージを作成しましたが、古いファイルのユーザー名/パスワードを使用して特定のアドレスをマウントするコマンドを使用できる/etc/fstabように、新しいファイルを変更する必要があります。mount -a/etc/fstab

以前のシステムのように動作するにはどうすればよいですか?私はローカルPCからファイルを読み取る方法を知り、これらのファイルを変更するとシステムが誤動作する可能性があることを知っています(少なくとも古いファイルを使用しようとしているとき)。

以前のfstabファイルは次のようになりました。

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=########-####-####-####-############ /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=########-####-####-####-############ none            swap    sw              0       0
//192.168.0.10/data /mnt/db cifs ro,iocharset=utf8,username=#####,password=##### 0 0

新しいファイルは次のようになります。

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/lubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=########-####-####-####-############ /boot           ext2    defaults        0       2
/dev/mapper/lubuntu--vg-swap_1 none            swap    sw              0       0

sudo mount -a新しいファイルで前のファイル(下)の最後の行を使用したいのですが、コマンドを使用するときに古いファイルがこれを行うには何が必要かわかりません。

//192.168.0.10/data /mnt/db cifs ro,iocharset=utf8,username=######,password=##### 0 0

ベストアンサー1

おすすめ記事