column
Overview
column formats text into aligned columns or a table. Ideal for making command output or colon-separated files readable. Commonly used with mount, fstab-like data, and custom script output. From util-linux.
Syntax
column [options] [file...]Common Options
| Option | Description |
|---|---|
-t, --table |
Create a table; determine columns automatically |
-s sep, --separator |
Input separator characters |
-o sep, --output-separator |
Output separator (default two spaces) |
-N names |
Column names header (newer) |
-R cols |
Right-align columns |
-J |
JSON output (newer util-linux) |
-x |
Fill columns before rows |
-c width |
Output width |
-n |
Disable “merge empty columns” behavior variants |
-l num |
Max columns keep (see man) |
Examples with Explanations
Table-ize whitespace
mount | column -t
df -h | column -t
ps -eo pid,user,comm,%cpu --sort=-%cpu | head | column -tCustom separators
column -t -s: /etc/passwd | less
echo -e 'a|b|c\n1|2|3' | column -t -s'|'Headers (newer)
printf 'user:uid:shell\nalice:1000:/bin/bash\n' | column -t -s: -N USER,UID,SHELLRight-align numbers
printf 'name val\na 10\nbb 3\n' | column -t -R 2JSON (when available)
mount | column -t -J | jq .Pretty fstab view
grep -vE '^\s*(#|$)' /etc/fstab | column -tPipelines
systemctl list-units --type=service --state=running | column -tNotes / Pitfalls
- Input with inconsistent field counts produces jagged tables — clean data first.
- Wide Unicode can misalign in some terminals.
- Default without
-twraps differently (classic column mode) — for tables always use-t. - Features like
-N/-Jneed sufficiently new util-linux. - Don’t use as a CSV parser for complex quoting — use
csvkit/pythonfor real CSV.
2026-relevant notes
- Still the fastest path to readable admin tables over SSH.
- JSON mode helps bridge to
jqtooling when available. - For TUI tables, tools like
procs/ezaalready format themselves.
Additional Resources
man column