Any idea why my root folder is empty? I should have the Desktop folders and other folders in there.
CodePudding user response:
You might have seen ~/Desktop
and such are automatically created for a new user. Ther user creation is done by useradd(8)
and in /etc/default/useradd
, there's this SKEL
variable:
# The SKEL variable specifies the directory containing "skeletal" user
# files; in other words, files such as a sample .profile that will be
# copied to the new user's home directory when it is created.
SKEL=/etc/skel
You can find the default $HOME
directory structure in /etc/skel
in the above case. If you do not find a Desktop
in /etc/skel
then the users don't have it by default. /root/
has this default skeleton after the OS installation.
% tree -a /etc/skel
/etc/skel
├── .bash_logout
├── .bashrc
├── .mkshrc
└── .profile
I'm not sure why the OP thinks root
should have /root/Desktop
, though.
CodePudding user response:
I believe this is a misunderstanding: the root directory is not the directory, called /root
, but the root of all directories, which is /
.