Skip to content

Instantly share code, notes, and snippets.

@DarkPark
Last active April 8, 2017 20:44
Show Gist options
  • Save DarkPark/6aa9c82957f96e6a67097cee0407f1ba to your computer and use it in GitHub Desktop.
Save DarkPark/6aa9c82957f96e6a67097cee0407f1ba to your computer and use it in GitHub Desktop.
How to move the /root directory to home partition
# it'b better to avoid symlinks
# use mount --bind
# as root
cp -a /root /home/
echo "" >> /etc/fstab
echo "/home/root /root none defaults,bind 0 0" >> /etc/fstab
# do it now
cd / ; mv /root /root.old; mkdir /root; chmod go-rwx /root; mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment