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
kos
  • 35,891
Knight
  • 13
  • 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 04 '15 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 04 '15 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 04 '15 at 20:53
  • I am not getting you @kos,my actual question was what does "ls / "command do – Knight Oct 04 '15 at 20:56
  • Ok, but then I don't get what you're missing; judging from your first statement you seem aware of the fact that ls lists files and folders; if you run ls /, it will list the files and the folders in /. The actual question was "which files are they", which I don't know how else I should interpret. Please clarify exactly what you're not understanding. – kos Oct 04 '15 at 21:04
  • 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 04 '15 at 21:06
  • @Knight bin dev boot etc cdrom media mnt lib lib64 proc root are all folders on your filesystem that make up the Linux OS and various apps. Then the home folder is where all of your own personal files are stored. Try ls /home. – lucideer Oct 04 '15 at 21:07
  • @lucideer I think you're right; the question's body was a little misleading though. – kos Oct 04 '15 at 21:10
  • http://www.tutorialspoint.com/unix/unix-file-system.htm - Linux is still UNIX, thanks $DEITY.... – Rmano Oct 04 '15 at 21:12
  • @lucideer -Yes that is what I was asking .Thanks – Knight Oct 04 '15 at 21:12

1 Answers1

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.

Wildcard
  • 1,153