The uniq Command The uniq is used to remove duplicate lines from a file on Unix-like operating systems.