Install Ls On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Install Ls On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

ls

List directory contents.

Maintainer: Michael Stone



Section: utils

Install ls

  • Debian apt-get install coreutils Click to copy
  • Ubuntu apt-get install coreutils Click to copy
  • Alpine OS apk add coreutils Click to copy
  • Arch Linux pacman -S coreutils Click to copy
  • Kali Linux apt-get install coreutils Click to copy
  • CentOS yum install coreutils Click to copy
  • Fedora dnf install coreutils Click to copy
  • Raspbian apt-get install coreutils Click to copy
  • macOS brew install coreutils Click to copy

List directory contents.

How to use ls?

Below are few example commands for ls that you can use in the terminal.

List files one per line:
ls -1Click to copy
List all files, including hidden files:
ls -aClick to copy
Long format list (permissions, ownership, size and modification date) of all files:
ls -laClick to copy
Long format list with size displayed using human readable units (KB, MB, GB):
ls -lhClick to copy
Long format list sorted by size (descending):
ls -lSClick to copy
Long format list of all files, sorted by modification date (oldest first):
ls -ltrClick to copy
To install the latest version of ls in your favorite operating system just copy the ls installation command from above and paste it into terminal. It will download and install the latest version of ls 2026 package in your OS.