How can I rename
/proc to something else forcefully?
mv /proc /0
mv: cannot move ‘/proc’ to ‘/0’: Device or resource busy
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
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.
/procis simply going to break things. Quite a few user space utilities, like ps(1) for example, expect
/proc. What you're trying to do is like trying to take a sedan and replace its steering wheel with a football and its dashboard with a cup of coffee before asking why on earth do the readings look funny.