Compare OS X command line to Linux command line?

Joined
Oct 30, 2010
Messages
273
Reaction score
0
Points
16
Location
Southern Illinois
Your Mac's Specs
MBP 15" I7 first one and loving it.
Anyone know of a list of differences between commands used in Linux and OS X command line? I would like to learn both at the same time.

Thanks
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
For most things the terminals are essentially similar. What differs is the compliment of tools you have access to by default on OS X. So if you stick to the basic terminal commands, then they are equal..

OS X uses BASH as the shell and Ubuntu uses DASH (but can be switched to BASH) and most other Linux variants usually stick with BASH..DASH is really bad for executing scripts. The D in DASH stands for "Diminished" in my mind, regardless of what it actually stands for..:)
 
OP
V
Joined
Oct 30, 2010
Messages
273
Reaction score
0
Points
16
Location
Southern Illinois
Your Mac's Specs
MBP 15" I7 first one and loving it.
For most things the terminals are essentially similar. What differs is the compliment of tools you have access to by default on OS X. So if you stick to the basic terminal commands, then they are equal..

OS X uses BASH as the shell and Ubuntu uses DASH (but can be switched to BASH) and most other Linux variants usually stick with BASH..DASH is really bad for executing scripts. The D in DASH stands for "Diminished" in my mind, regardless of what it actually stands for..:)

Thanks RazOrEdge. I'm using Debian distro. Debian uses Bash. Not sure why but when I first started it seemed that there were a lot of differences. I have went back and now it seem there are very few differences. Strange not sure what I was doing at first. I do understand that some or all the commands are programs that run and need to be installed to be used. I really like using the command line.
 
Joined
Dec 8, 2009
Messages
453
Reaction score
10
Points
18
Location
The same as Sheldon Cooper - East Texas
Your Mac's Specs
iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
There is very little difference from the command line. I move back and forth during the day from Debian to OSX terminal without thinking about it. Unix commands, Bash, Perl and Ruby scripts all run the same way.

That being said, if you are EXPLORING from the terminal you will find major differences once you drill down into the subdirectories, since OSX is built on BSD Unix and Linux is a Unix clone. For instance, if you try to find rc2.d in /etc on OSX so you can change start up programs, like in Debian, you are out of luck - you have to find the OSX/BSD documentation.

But, looking at both from the top of the tree, they are mostly the same, with the usual home, etc, dev, sbin and other subdirectories (not folders) being recognizable.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top