Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
Almost all of it. –  AndrejaKo Jun 12 '11 at 18:00
    
Fire up bash and see if it works :) –  Xeross Jun 12 '11 at 18:25
add comment

closed as primarily opinion-based by Shakehar, Simon Sheehan, Moses, Mokubai, tapped-out Nov 2 '13 at 1:11

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

up vote 6 down vote accepted

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.

share|improve this answer
1  
The basic commands are quite different (except for a few common parameters) between OS X (BSD Unix) and Linux, it's not even funny. For example, while not in coreutils, the differences between implementations of top lead to totally different solutions for specific issues. Also, to add to your examples, Mac OS X has Directory Service for user management, networksetup for many network related tasks, and launchd as replacement for init/rc/(x)inetd/crond. –  Daniel Beck Jun 12 '11 at 19:06
    
@Daniel: ps is even worse than top, I think. –  grawity Jun 12 '11 at 19:20
    
Even though the book specifies as being written for solaris and svr4, would they apply to new releases of netbsd and pcbsd the same? –  a sandwhich Jun 12 '11 at 19:30
    
@grawity At least GNU ps supports BSD syntax, i.e. ps aux works fine, that's all I need ;-) But you're right. Quite a few commonly used tools are a pain when switching between systems. –  Daniel Beck Jun 12 '11 at 19:40
    
@a sandwhich: SysV (Solaris, SVR4) and BSD had big differences even in their old releases. (I think Linux is slightly closer to your book than BSDs.) Nevertheless, they both are Unix, so my answer still applies. –  grawity Jun 12 '11 at 20:18
show 3 more comments

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.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.