系统出现-bash: cannot create temp file for here-document: Read-only file system

系统出现-bash: cannot create temp file for here-document: Read-only file system

1、输入命令tab时提示:

cd /-bash: cannot create temp file for here-document: Read-only file system
使用mount命令查看挂载的磁盘的权限后发现只有ro权限

mount

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=16381156k,nr_inodes=4095289,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
… … … …

/dev/vda1 on / type ext4 (ro,relatime,data=ordered)

2、解决办法:

重新挂载硬盘,给rw权限;

/dev/vda1 on / type ext4 (rw,relatime,data=ordered)

你可能感兴趣的:(linux)