column Command
Beginner Text Processing man(1)Format text into columns for clean output
👁 8 views
📅 Updated: Mar 15, 2026
SYNTAX
column [OPTION]... [FILE]...
What Does column Do?
The column command formats text into aligned columns for readable tabular display. It automatically determines column widths based on content, producing neatly formatted output.
column is especially useful for formatting command output, CSV files, and any delimited data into human-readable tables. The -t flag (table mode) is the most commonly used, automatically creating aligned columns from delimited input.
This command is invaluable for system administration tasks where you need to present data clearly — formatting mount points, network information, user lists, and configuration summaries.
column is especially useful for formatting command output, CSV files, and any delimited data into human-readable tables. The -t flag (table mode) is the most commonly used, automatically creating aligned columns from delimited input.
This command is invaluable for system administration tasks where you need to present data clearly — formatting mount points, network information, user lists, and configuration summaries.
Options & Flags
| Option | Description | Example |
|---|---|---|
| -t | Create a table with aligned columns | mount | column -t |
| -s | Set input delimiter (for -t mode) | column -t -s',' data.csv |
| -n | Do not merge multiple delimiters | column -tn file.txt |
| -o | Set output delimiter | column -t -s',' -o' | ' data.csv |
| -c | Set output width for filling columns | column -c 80 names.txt |
| -J | Output as JSON | column -t -s',' -J data.csv |
Practical Examples
#1 Format mount output
Aligns the mount command output into neatly formatted columns.
$ mount | column -t#2 Display CSV as table
Formats comma-separated data into an aligned table.
$ column -t -s',' data.csv
Output:
Name Age City
Alice 30 London
Bob 25 Paris
#3 Format /etc/fstab readably
Aligns the filesystem table for easier reading.
$ column -t /etc/fstab#4 Display list in columns
Arranges a long list into multiple columns that fit the terminal width.
$ ls /usr/bin | column#5 Format pipe-delimited data
Reads pipe-delimited input and outputs an aligned table with pipe separators.
$ column -t -s'|' -o' | ' report.txt#6 Custom table output
Creates a formatted table from inline CSV data.
$ echo -e 'Name,Role,Dept\nAlice,Dev,Eng\nBob,PM,Prod' | column -t -s','
Output:
Name Role Dept
Alice Dev Eng
Bob PM Prod
Tips & Best Practices
Quick table formatting: Pipe any delimiter-separated output through column -t for instant readable tables: cat /etc/passwd | head -5 | column -t -s':'
JSON output: Modern versions of column support -J for JSON output, which is useful for scripting and data processing.
Wide output: column fills the terminal width. For very wide data, pipe through less -S to enable horizontal scrolling.
Frequently Asked Questions
How do I display CSV data as a table?
Use column -t -s',' file.csv. The -t flag creates a table and -s sets the delimiter to comma.
How do I align command output into columns?
Pipe the output through column -t: command | column -t. This automatically aligns whitespace-separated data.
What is the difference between column and printf?
column automatically determines column widths. printf requires you to specify widths manually. column is easier for quick formatting; printf gives more control.
Related Commands
More Text Processing Commands
Master Linux with Professional eBooks
Curated IT eBooks covering Linux, DevOps, Cloud, and more
Browse Books →