Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Development and Darwin (http://www.mac-forums.com/forums/os-x-development-darwin/)
-   -   Compare OS X command line to Linux command line? (http://www.mac-forums.com/forums/os-x-development-darwin/303633-compare-os-x-command-line-linux-command-line.html)

V6Pony 09-24-2013 07:38 AM

Compare OS X command line to Linux command line?
 
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

Lifeisabeach 09-24-2013 07:59 AM

Quote:

Originally Posted by V6Pony (Post 1539101)
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.

This strikes me as an excellent article on the matter:
osx - Is the terminal in mac and linux the same? - Stack Overflow

For more resources:
linux mac terminal commands - Startpage Web Search

V6Pony 09-24-2013 08:58 AM

Quote:

Originally Posted by lifeisabeach (Post 1539103)

Thanks for the info lifeisabeach. Not looking for a web search.

Raz0rEdge 09-24-2013 09:15 AM

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..:)

V6Pony 09-24-2013 10:08 AM

Quote:

Originally Posted by Raz0rEdge (Post 1539120)
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.

cptkrf 09-26-2013 12:32 PM

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.


All times are GMT -4. The time now is 02:51 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.