[newb q] root folders not showing
Hey,
I installed arch for the first time. Havent gotten to installing a DE yet. When I boot up arch and log in as root, 'ls' does not output anything. I know /etc /opt /run etc are there because I can 'cd' in to them, but why are they not shown in the output of 'ls'?
Lastly, when in /etc for instance I cannot go up one directory with cd.., I get BASH - command not found. What gives?
Edited 15 Jul 2019. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 2 · 100% up
- Kind
- Text
- ID
- cdg2if
8 comments
ls, typed just like that with no options, will only show the non-hidden contents of the current working directory. Try typing it in a directory with more stuff in it and maybe even readman lsto learn how it works.Try
cd ..notcd..I suggest you find a bash tutorial on the web and apply some of your time and effort to it.
Hey,
Tnx for the reply!
This is all just a bit embarassing.
I have no separate /home partition.
Turns out when I log in as root after boot I end up in [root@ArchLinux ~]$, which is root home?
Anywho, everything is fine. When I cd to \ all folders are there. Adding that extra space to cd .. fixed that for me. Ill be looking at some bash tutorials for the rest of the day and doing some facepalming while im at it.
If he is in root, ls should list all the directories. It does sound like a real problem.
When you log in as anyone, default current path is the home, and for root the home is
/root. Root's home is empty by default, hence there is nothing.Nope.
When you log in as root, you begin in the /root directory which is root's home. Note that this is not the same as the root of the file structure.
Maybe your path is set wrong? Did you try using the full path to ls?
When you log in as anyone, default work directory is the user's home directory. For root, that home is
/root, which is empty by default. And by default,lswith no arguments lists contents of the current work directory, which in your case is/root, which is empty. Hence no output.You can do
ls -ato list including hidden files, which will also have.bash_historyand a few other things that end up created in/root. Those are hidden files, as all files that start with a dot.To get a listing of
/, you need to dols /instead.Also,
cd..does not work because there is nocd.., there is onlycd. Two dots represent the upper directory and needs to be given as an argument tocd, so you should docd ..instead to get one directory up.Why are you logging in as root?
log in as user & use sudo for admin.
Things should be back to normal.