This article spotlights alternative tools to uniq, a utility that reports or omits repeated lines.

The software featured here is free and open source. All tools provide a command-line interface (CLI) unless otherwise stated.
| Alternatives to uniq | |
|---|---|
| runiq | An efficient way to filter duplicate lines from input, à la uniq |
| huniq | Removes duplicates from stdin using a hash table |
| nauniq | Non-adjacent uniq |
| semiuniq | Removes nearby repeated lines in a file |
| uq | Removes duplicate lines from the output, regardless of the order |
| zet | Perform set operations on files considered as sets of lines |
| anew | Adds new lines to files, skipping duplicates |
| anewer | Appends lines from stdin to a file if they don't already exist in the file |
Are we missing any open source alternatives to uniq? Please let us know.
All the CLI tools in this series.
| Alternatives to CLI tools |
|---|
| age // awk // bc // cal // cat // cd // chmod // cksum // cloc // cmp // compress // cp // cron // curl // cut // date // dd // df // diff // dig // du // fdisk // file // find // free // ftp // grep // gzip // hexdump // history // jq // kill // less // locate // ls // lsof // make // man // more // mv / ping // ps // psql // rename // rm // sed // split // ssh // stow // strings // sudo // sysctl // tail // talk // tar // telnet // time // top // touch // traceroute // tree // uname // uniq // uptime // vi // watch // Wget // who // whois // xargs |
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Know a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |


What about uq. It’s an alternative to sort | uniq.
Like so many of these alternatives to traditional tools, it’s written in the wonderful Rust language.
Yes, Rust seems very popular with these types of tools.
We’ve added an entry for uq. Many thanks for your suggestion.
Please add zet, some of its subcommands are similar to uniq
Thanks Lance, we’ve updated the article to include zet, an interesting tool.
I suggest adding anewer and anew. They are sort of alternatives to uniq
Agreed, they have both been added. Thanks Oskar