Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

nl

Number lines of file content

Syntax

nl [OPTION]... [FILE]...

Common Options

-b aNumber all lines
-b tNumber non-empty lines only
-n lnLeft align line numbers
-n rnRight align line numbers
-wSet line number width

Common Examples

nl file.txt

Show file with line numbers

nl -b a file.txt

Number including empty lines

Related Commands

Related Tools

More Code & Dev Tools