Will I find only GNU command line tools in Ubuntu?
A couple well known command line tools exist in several versions depending on the Unix flavor (like sed, find, ld).
I was wondering which versions are available in Ubuntu (I assume GNU for all but I'd like to confirm that)?
There are a few ways of interpreting your question so I'll be explicit in my answers.
Are all command line applications in Ubuntu GNU projects?
Of course not, you can install whatever you like and there are many things that are part of Ubuntu or Debian directly that aren't upstream.
What about the most the command-line applications that ship with Ubuntu?
coreutils
makes up a vast swathe of these (and this is a GNU project — it's what the GNU in GNU/Linux represents) but in order to be POSIX compliant, a system needs more than just coreutils
.
Just in case you're wondering what coreutils
covers, here's its package description:
This package contains the basic file, shell and text manipulation
utilities which are expected to exist on every operating system.
Specifically, this package includes: arch base64 basename cat chcon chgrp
chmod chown chroot cksum comm cp csplit cut date dd df dir dircolors
dirname du echo env expand expr factor false flock fmt fold groups head
hostid id install join link ln logname ls md5sum mkdir mkfifo mknod mktemp
mv nice nl nohup nproc od paste pathchk pinky pr printenv printf ptx pwd
readlink rm rmdir runcon sha*sum seq shred sleep sort split stat stty sum
sync tac tail tee test timeout touch tr true truncate tsort tty uname
unexpand uniq unlink users vdir wc who whoami yes
So are all POSIX commands GNU?
No. While Ubuntu does use GNU, it relies on a lot of non-GNU projects for its POSIX compliance.
I've covered which commands are POSIX before so with that list, we can quickly generate a list of packages and then grab all the project Homepage URLs from those packages. Even without visiting the URLs you can see that they're not GNU (some are even overtly nonGNU).
$ apt-cache show $(for c in "admin alias ar asa at awk basename batch bc bg break c99 cal cat cd cflow chgrp chmod chown cksum cmp colon comm command compress continue cp crontab csplit ctags cut cxref date dd delta df diff dirname dot du echo ed env eval ex exec exit expand export expr false fc fg file find fold fort77 fuser gencat get getconf getopts grep hash head iconv id ipcrm ipcs jobs join kill lex link ln locale localedef logger logname lp ls m4 mailx make man mesg mkdir mkfifo more mv newgrp nice nl nm nohup od paste patch pathchk pax pr printf prs ps pwd qalter qdel qhold qmove qmsg qrerun qrls qselect qsig qstat qsub read readonly renice return rm rmdel rmdir sact sccs sed set sh shift sleep sort split strings strip stty tabs tail talk tee test time times touch tput tr trap true tsort tty type ulimit umask unalias uname uncompress unexpand unget uniq unlink unset uucp uudecode uuencode uustat uux val vi wait wc what who write xargs yacc zcat"; do dpkg -S $(readlink -f $(which $c)); done | awk -F: '{print $1}' | sort -u) | awk '/Package|Homepage/'
Package: at
Package: bc
Homepage: http://ftp.gnu.org/gnu/bc/
Package: binutils
Package: bison
Homepage: http://www.gnu.org/software/bison/
Package: bsdmainutils
Package: bsdutils
Homepage: http://userweb.kernel.org/~kzak/util-linux/
Package: coreutils
Homepage: http://gnu.org/software/coreutils
Package: cron
Homepage: http://ftp.isc.org/isc/cron/
Package: cups-client
Homepage: http://www.cups.org
Package: dash
Homepage: http://gondor.apana.org.au/~herbert/dash/
Package: diffutils
Homepage: http://www.gnu.org/software/diffutils/
Package: ed
Homepage: http://www.gnu.org/software/ed/
Package: file
Homepage: http://www.darwinsys.com/file/
Package: findutils
Homepage: http://savannah.gnu.org/projects/findutils/
Package: flex
Homepage: http://flex.sf.net/
Package: gawk
Homepage: http://www.gnu.org/software/gawk/
Package: gcc
Package: graphviz
Homepage: http://www.graphviz.org/
Package: grep
Homepage: http://www.gnu.org/software/grep/
Package: gzip
Package: heirloom-mailx
Homepage: http://heirloom.sourceforge.net/mailx.html
Package: libc-bin
Homepage: http://www.eglibc.org
Package: libc-dev-bin
Homepage: http://www.eglibc.org
Package: login
Homepage: http://pkg-shadow.alioth.debian.org/
Package: m4
Homepage: http://www.gnu.org/software/m4/
Package: make
Homepage: http://www.gnu.org/software/make/
Package: man-db
Homepage: http://man-db.nongnu.org/
Package: ncurses-bin
Homepage: http://invisible-island.net/ncurses/
Package: patch
Package: pax
Package: procps
Homepage: http://gitorious.org/procps
Package: psmisc
Homepage: http://psmisc.sf.net/
Package: sed
Homepage: http://www.gnu.org/software/sed/
Package: sharutils
Homepage: http://www.gnu.org/software/sharutils/
Package: sysvinit-utils
Homepage: http://savannah.nongnu.org/projects/sysvinit
Package: time
Homepage: http://www.gnu.org/software/time
Package: util-linux
Homepage: http://userweb.kernel.org/~kzak/util-linux/
Package: vim-tiny
Homepage: http://www.vim.org/
You can see User-land "GNU" from Wikipedia- .
So, GNU commands are available for Ubuntu. To see available commands, see List of GNU Packages.
And for particular command (Ex : find): findutils from GNU Project
Almost all Unix commands exist with different versions depending on the OS used.
There are significant differences, usually GNU extensions to the POSIX standard.
On Ubuntu, you can expect the GNU version to be the standard for most of these commands, but not necessarily all.
The most obvious example is /bin/sh
which is a link to dash
on Ubuntu and not any more bash
like it used to be.
While bash
is part of the GNU project, dash
comes from originally from a netBSD one.