New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Compare OS X command line to Linux command line?


Post Reply New Thread Subscribe

 
Thread Tools
V6Pony

 
V6Pony's Avatar
 
Member Since: Oct 30, 2010
Location: Southern Illinois
Posts: 261
V6Pony is an unknown at this point
Mac Specs: MBP 15" I7 first one and loving it.

V6Pony is offline
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
QUOTE Thanks
Lifeisabeach

 
Lifeisabeach's Avatar
 
Member Since: Sep 30, 2007
Location: Wilmington, NC
Posts: 6,832
Lifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond repute
Mac Specs: iMac i3 (mid-2010) + OS 10.9; TV 3; iPhone 5S; iPad 4

Lifeisabeach is offline
Quote:
Originally Posted by V6Pony View Post
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


Please verify and include the exact model/year of your Mac and OS X version number (available from "About This Mac", then "More Info" on the Apple menu). Also advise us if you have any antivirus or "cleaning" software installed on your Mac. If you are using MacKeeper, you are hereby advised to uninstall it.
------
Links to commonly recommended software and instructions: Onyx | Apple Hardware Test | How to test your hard drive | How to reveal the User Library
------
Having issues with Safari? Adware is on the rise. See this guide on how to remove it: The Safe Mac Adware Removal Guide
------
Lifeisabeach - Mac-Forums Member of the Month June 2009, Feb 2012, and March 2013.
QUOTE Thanks
V6Pony

 
V6Pony's Avatar
 
Member Since: Oct 30, 2010
Location: Southern Illinois
Posts: 261
V6Pony is an unknown at this point
Mac Specs: MBP 15" I7 first one and loving it.

V6Pony is offline
Quote:
Originally Posted by lifeisabeach View Post
Thanks for the info lifeisabeach. Not looking for a web search.
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,318
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
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..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
V6Pony

 
V6Pony's Avatar
 
Member Since: Oct 30, 2010
Location: Southern Illinois
Posts: 261
V6Pony is an unknown at this point
Mac Specs: MBP 15" I7 first one and loving it.

V6Pony is offline
Quote:
Originally Posted by Raz0rEdge View Post
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.
QUOTE Thanks
cptkrf

 
Member Since: Dec 08, 2009
Location: The same as Sheldon Cooper - East Texas
Posts: 362
cptkrf is a jewel in the roughcptkrf is a jewel in the rough
Mac Specs: MacMini,2013, Intel Core i7, 16gb, 27" Thunderbolt display (Highly recommended!)

cptkrf is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« webViwer At Xcode | xcode and array help »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Mac experts please help a Linux user to switch klaxian Switcher Hangout 8 07-31-2012 01:00 AM
How does OS X compare to Linux? Murrquan Switcher Hangout 29 06-21-2008 06:21 AM
What is your opinion on the future of Linux and the Mac? RickR Schweb's Lounge 17 05-09-2008 05:47 AM
Macbook - Linux triple boot issues - HELP jhquest Running Windows (or anything else) on your Mac 2 10-02-2007 10:55 PM
XP, Vista, Ubuntu and then back home Kenotic Switcher Hangout 20 03-02-2007 01:29 AM

All times are GMT -4. The time now is 10:03 AM.

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

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?