Ask Your Question

how to access directories after switching to superuser in fedora

asked 2017-07-04 12:56:13 -0500

blastoise gravatar image

If i don't switch to superuser using su- command then terminal doesn't give me permission to make directories if i switch to superuser, then the only file being shown is anaconda-ks.cfg and i cannot cd into it. How to do i access my directories like Desktop etc. after switching to superuser?

edit retag flag offensive close merge delete


anaconda-ks.cfg is a regular file if I am not mistaken.

Where do you want to create a directory?

villykruse gravatar imagevillykruse ( 2017-07-04 14:27:35 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-07-04 14:34:51 -0500

Aeyoun gravatar image

I’m assuming you’re confused about your home directory location. As a regular user, your home directory is /home/USERNAME/ and when you’re the root user, your home directory is at /root/. Now, the ~/ expansion will resolve to the home directory of the current user. So if you run ls ~/ as root all you see is /root/anaconda-ks.cfg, but when you run ls ~/ as USER you’ll see the contents of /home/USER/.

You get away this by using full paths instead of the tilde-to-home expansion.

edit flag offensive delete link more


thank you so much. I am new to linux and this was driving me nuts. Thanks a lot :)

blastoise gravatar imageblastoise ( 2017-07-05 14:24:05 -0500 )edit

Question Tools

1 follower


Asked: 2017-07-04 12:56:13 -0500

Seen: 84 times

Last updated: Jul 04 '17