How Do I Format a Read Only File in Linux?
Contents

How do I change a read only file in Linux?

Long Answer

  1. Log in as the root user: [email protected]:~$ sudo su –
  2. Open hostname: [email protected]:~# vi /etc/hostname.
  3. You will see oldName . …
  4. Open hosts: [email protected]:~# vi /etc/hosts. …
  5. Similarly to what you did in step 3, change the computer name from oldName to newName . …
  6. Exit the root user: [email protected]:~# exit.

How fix read only filesystem Linux?

If you want to force your root filesystem to remount as rw, you can do the following. Try running dmesg | grep “EXT4-fs error” to see if you have any issues related to the filesystem / journaling system itself. I would recommend you to restart your system, then. Also, sudo fsck -Af answer by ObsessiveSSOℲ won’t hurt.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest