Logo Neurocoda

Mac Ubuntu Style ll Command

Neurocoda
Neurocoda
2026-07-03 12:46:47 119 Words 1 Min ...

Why do you need the ll command?

In Ubuntu systems, ll is the default alias for ls -alF, which visually displays:

  • File permissions
  • Owner information
  • File sizes
  • Hidden files
    However, the Mac terminal does not have this alias configured by default. This article teaches you how to quickly implement this productivity tool.
    ![](Mac 实现 Ubuntu 风格的 ll 命令/IMG-20250221101634753.png)

Three-step configuration tutorial

Step 1: Locate the configuration file

  1. Open Terminal
  2. Enter the following command to edit the configuration file:
Terminal window
vim ~/.zshrc

If using bash, modify ~/.bash_profile

![](Mac 实现 Ubuntu 风格的 ll 命令/IMG-20250221101421827.png)

Step 2: Add code
Insert one of the following at the end of the file:

Terminal window
# Equivalent to ls -l
alias ll='ls -l'
# Ubuntu style (includes hidden files + human-readable file sizes)
alias ll='ls -alhF'

Parameter explanation:

  • -a Shows hidden files
  • -l Detailed listing
  • -h Human-readable file sizes (e.g., 1K, 234M)
  • -F Appends file type indicators (/ for directories, * for executables)
    ![](Mac 实现 Ubuntu 风格的 ll 命令/IMG-20250221101451631.png)

Step 3: Activate the configuration

Terminal window
source ~/.zshrc

![](Mac 实现 Ubuntu 风格的 ll 命令/IMG-20250221101513523.png)

Verification

![](Mac 实现 Ubuntu 风格的 ll 命令/IMG-20250221101543532.png)

Title: Mac Ubuntu Style ll Command Author: Neurocoda Created at: 2026-07-03 12:46:47 Link: https://neurocoda.com/zh-TW/posts/mac-ubuntu-style-ll-command-en/ License: This work is licensed under CC BY-ND 4.0.

Comments