AWK - Number all lines in a file

awk '{ print NR "\t" $0 }' file.txt

Number lines in a fancy manner

awk '{ printf("%5d : %s\n", NR, $0) }' file.txt