uniq command in linux uniq command: The uniq command is use to find uniq value in file and remove duplicate value . File output # cat file test test test1 test2 uniq comm…