Difference between unix and linux commands [closed]
Matthew Martinez
I just bought the book UNIX in a Nutshell for really cheap even though I spend most of my time in some form of Linux. The first half of the book is commands and shell syntax. About how much of that is translatable or usable in Linux?
22 Answers
The major concepts (pipes, files, devices, networks) stay the same. The shell syntax applies to Linux too – almost all Unix-like OSes use the same Bourne shell (sh) and/or its derivatives (bash is especially common, zsh is probably second).
The basic commands (ls, mv, rm) stay the same, but their options may differ. In particular, most Linux distributions come with GNU coreutils tools, which have a much wider range of options than their BSD and Unix counterparts.
Some other commands have been entirely replaced in Linux, too (example: while such network configuration tools as ifconfig and route still exist on Linux, they are considered deprecated in favor of ip).
It's when you go deep into system configuration that you start seeing big differences. For example, authentication (PAM, BSD Auth, /etc/shadow) and user databases (NIS, nsswitch); boot process (SysV init vs BSD init vs systemd vs Upstart); device naming (eth0 vs tlp0 vs en0, MAKEDEV vs udev).
One important topic is software installation: generally, Linux distributions provide a range of pre-built packages along with a "package manager" tool that downloads and installs them. Manually downloading and compiling from source code (./configure && make) is relatively uncommon.
Most of it, generally, even if not all the commands are exactly the same, it's important you understand the principles and how it works, then it'll be relatively easy for you to use different or new ones. Syntax and an understanding of how the command line works is the most important thing. While I'd say 90% of what I use for UNIX (on my Mac) I use just the same in Ubuntu (including ls, cd, the like), there are some Linux-specific commands, however if you know how to use the command line you can pick them up just fine. But yeah, pretty much everything is the same and it should be just fine.