1

Running the ls / command some files are coming out;

What are those files?

They are not even directories.

Output of ls /:

bin dev boot etc cdrom media mnt home lib lib64 proc root
10
  • I'm assuming you're assuming those should be the same on each system, but they're not; please edit your question and add the output of ls -l / by pasting it inside the editor, selecting it and clicking the { } button at the top, because no one knows what you have inside /
    – kos
    Oct 4, 2015 at 20:42
  • I'm not sure why @kos asked you to add the output of ls -l /!? ls / simply lists all the files and directories in the top-most level of your filesystem. Running nautilus / & will do the same with a GUI.
    – lucideer
    Oct 4, 2015 at 20:49
  • 1
    @lucideer Despite the title, the question seems to be about the origin of the files in /; in a fresh installation there are no regular files in /, so someone / something must have place them.
    – kos
    Oct 4, 2015 at 20:53
  • I am not getting you @kos,my actual question was what does "ls / "command do
    – Knight
    Oct 4, 2015 at 20:56
  • 1
    @kos I assumed the general thrust of his question was "What is /" as Ubuntu's general UI has recently tended toward abstracting away filesystem structure (as OSX and Windows have done).
    – lucideer
    Oct 4, 2015 at 21:06

1 Answer 1

1

ls / lists the contents of the root directory. (Elsewhere I wrote an explanation of the various meanings of the word root, which you can read here.)

The files that are showing up in the output are indeed directories, as you can easily verify by running ls -p /. The -p flag will cause ls to append a slash to every directory listed, so you can differentiate them from files that are listed.

The source of the confusion seems to be that you don't understand what is called the Linux Filesystem Hierarchy. There are specific directories in specific locations, each with a specific purpose. For example, /etc (pronounced "slash et-see") contains configuration files; you can think of the name etc as an acronym for "editable text configuration."

Each of the directories in the output of ls / have a specific purpose. The full reference material explaining this can be found here. For a decent primer on the Linux Filesystem Hierarchy, written for those familiar with Windows, try here.

Even more fundamental than the purpose of all these directories is the concept that ALL files and directories on Linux are part of a single directory "tree". Do a google image search for "directory tree" if the term "tree" seems confusing. Unlike Windows where you have various drives (the C: drive, the D: drive and so on), in Linux, mounted drives are tied in to the rest of the directory tree at a "mount point", which is just another directory.

Not the answer you're looking for? Browse other questions tagged or ask your own question.