ls ( List directory linux command tutorials )


  • ls stands for list directory contents.

  • It is similar to age old DOS – DIR command.

  • It is used as ls [OPTION] ….. [FILE]

  • List information about the Files ( the current directory by default). It sorts entries alphabetically if none of –sort is specified.

  • The snapshot below shows the output given by ls command in terminal


  • As seen in the snapshot some entries are shown in blue and the rest in white.

  • It should be noted that entries indicated in blue are directories and in white are files.

  • Following are the options for ls command.




list hidden files.


list the name of the current directory.


show directories with a trailing '/'

executable files with a trailing '*'


show group ownership of file in long listing


long listing giving details about files and directories such as permission, creator name, file last modified by, Size in bytes, Time stamp and file name.


list all subdirectories encountered


List all files ordered by time modified.