-1

When I ls all files in CentOS 7, I get very few directories and there's no bin, no lib etcenter image description here

What happened here?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255

2 Answers2

3

You are executing ls in home directory. The current working directory ~ is shown in prompt after hostname (localhost). ~ is current user's home directory.

You should run ls /, or change directory by cd / before running ls, if you want to see contents of the root directory.

sebasth
  • 14,872
0

You are in the home of root. That explains why you have the anaconda-ks.cfg.

To get ls by itself to return bin, lib, lib64 and so on and so forth, you need to first run one of the following:

cd /usr

cd /

And the run ls.

You can also run one of these:

ls /

ls /usr

Basically, in CentOS, those directories exist in /usr ( there is also a symlink to them in /) and not in /root which is where you've been running ls.

Nasir Riley
  • 11,422