I am going to learn how to use the command line. Specifically, I will be using the book: The Linux Command Line: A Complete Introduction. Now, do I have to use a Linux distro to walk through the book, or would OS X be sufficient?If I need a Linux distro, then would using it through a VM be sufficient or do I need to install it natively?
Do I need a Linux distro to learn the command line or would OS X be sufficient?
linux;command line;osx
I would highly recommend running Linux in a VM. All the software is available freely to download and there is no practical difference between running in a VM and running natively for the purposes of learning the command line.Furthermore, Linux command line mostly consists of bash + GNU coreutils, which is very different from BSD Unix (and OS X is a succedessor of BSD Unix). There is a very big difference of preferences in writing arguments in BSD Unix and GNU Linux. You can bite yourself even as non-newbie with different options to standard utilities like ps and tar if you work on both systems.Using OS X when your book is Linux specific will regularly throw up inconsistencies and differences that will appear superficial when you're more experienced, but will simply be confusing when you're learning. Keep things easy for yourself.This will also allow you to experiment without the worry of breaking your machine by deleting or changing any important files.And last, though certainly not least, it will allow you to set up a SSH connection to your VM from your OS X Terminal, so you can get used to using SSH keys, and to the idea that it makes no difference whether your Linux server is a native machine, a local VM, or running out on AWS or Digital Ocean: it all works the same!