How can I rename
/proc to something else forcefully?
mv /proc /0
mv: cannot move ‘/proc’ to ‘/0’: Device or resource busy
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You cannot rename a directory on which a filesystem is currently mounted.
(Why not? I expect it would mess up a lot of kernel data structures that keep track of mounted filesystems.)
Linux lets you change the directory that a filesystem is mounted on, however. You can do this:
mkdir /0 mount --move /proc /0
After this, the proc filesystem will be mounted on
/proc won't be a mount point anymore.
Don't do this on a production system, of course. It won't completely break your system, however, it'll just make some programs work badly or not at all (for example, say goodbye to
ps). Keep a root shell open, and run
mount --move /0 /proc to get the proc filesystem back where applications look for it.