LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-29-2012, 07:19 PM   #1
punchy71
Member
 
Registered: Dec 2011
Posts: 172

Rep: Reputation: Disabled
Command line interface question


In the command line interface, are all the Linux commands universally the same to all Linux "distro's" and will work with all of them? Is there some incompatibility? Are there some "distro's" that have specific commands just to that "distro" and if so which "distro's" have them? How does the BSD's compare to Linux commands? Will Linux commands work under the BSD's? How about vice versa? If I remember correctly (I'm just going by memory here); Mac OS X is based on FreeBSD, so how does it's command's cross compatibility compare with all the above?

Thank you
 
Old 08-29-2012, 07:24 PM   #2
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
Compare BSD and Linux
 
Old 08-29-2012, 07:27 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
For details, you'd need to go thru the documentation. Here is an "introductory" answer.....

First, it all begins with Unix---for any Unix-like system, you will find strong similarities.

Second, there is a distinction between the shell language, and the various utilities. For example, the most common Linux shell is BASH. You can have some assurance that this will be the same across various distros. Similarly, the core utilities also tend to be standard.

Short answer: When comparing unix-like systems, you will find much more that same than different. The exceptions is where you will spend your time.
 
1 members found this post helpful.
Old 08-29-2012, 07:30 PM   #4
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
For further enlightenment --> http://www.linuxcommand.org/index.php
 
Old 08-30-2012, 05:17 PM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Much of the *nix world revolves around the POSIX standard; a large, complex specification that defines a minimally-compatible operating system. Most *nix-style OSes try to conform to this standard at least in part, and so should have at least a basic level of compatibility. Above and beyond POSIX, however, individual operating systems are free to add or alter their features and behavior as they will, just as long as the POSIX behavior is still available when needed.

For example, POSIX specifies that the system must include a basic shell (/bin/sh) that supports certain features and syntax, and a set of core utilities such as grep, sed, and awk. So on Linux you have bash, and on some other systems you might be using ksh or another shell. ksh and bash are both POSIX compatible, and have many other syntax similarities, but there are also many differences as well. Similarly BSD has its own home-grown version of grep and sed, as does AIX, among others, and Linux uses versions written by the GNU project (bash is also a GNU program). These tools are again all broadly compatible at the POSIX level, but often also include features that go above and beyond the standard, which are not compatible. The gnu coreutils in particular have been expanded far beyond POSIX and include many useful features not found elsewhere.

What it all boils down to is that if you stick with POSIX, you can be fairly guaranteed that what you use is cross-platform (or at least can be made to be with minimal effort), but outside of that you have to check the documentation for the platform in question.

Last edited by David the H.; 08-30-2012 at 05:21 PM. Reason: fixed typo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Interface sameeruj Linux - Newbie 10 12-14-2011 04:06 PM
Command Line Interface sj061 Linux - Newbie 4 02-22-2007 01:48 AM
Can only use command line interface! The helpless one Linux - Newbie 6 03-12-2006 03:42 PM
Command line through a web interface tangle Linux - Software 2 01-13-2005 02:54 PM
Can't get from command line interface to GUI dphildebrand Linux - Newbie 3 12-03-2003 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration