LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-24-2005, 09:33 AM   #1
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Rep: Reputation: 30
unix;)linux.


I have some trival doubt in unix and Linux.

In unix:
======

1)unix is open source or not?( i mean open or closed sou2)rce?)
It was invented in 1960's in AT&A(at that time FSF exist or not,If not where from the basic tools
has taken?like ls make pwd...
3)Does unix has kernal or not ?
4)If Yes Where can i get unix kernal source code?
5)All the unix flavare's are open sorce or not?

In Linux:
=======

1)Can i release the Linux without changing the service script.
2)Just rename the distro name to my desired name And without out modify the intsallation script?
 
Old 10-24-2005, 10:35 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
1) Have a look at this thread. It will give you details about the history of Unix and Linux.

http://www.linuxquestions.org/questi...5&pagenumber=1

In breif:
Linux IS open source - it was written from the ground up to LOOK like Unix but is NOT Unix.

Unix has two main streams:
System V = The AT&T developed Unix that started it all.
Berkley = The Free Unix that AT&T gave to universities that was largely enhanced by the University of California at Berkley (hence the name).

More detail:
System V is NOT open source. Most commercial variants of Unix (Solaris, HP-UX, AIX, True64, SCO) include some System V stuff. (Though Solaris recently released an open source version for x86.)

Berkley was the basis for open source Unix called *BSD such as FreeBSD and OpenBSD.

A lot of what was developed in Berkley found its way into the commercial versions (in fact up until a few years ago some of them were just value added versions of Berkley but then as noted above many of them started incorporating System V in as well.)

2) Didn't quite get that one - I think it may be answered by above though.

3) Unix and Linux both have kernels. The name changes depending on the variant/distro you are on.

4) You can't except for the BSD and x86 Solaris. Just do a Google search for BSD then for Solaris and you find how to get the distributions.

5) No MOST Unix flavors are NOT open source as noted above - only the BSD variants are.

Linux:
1) & 2) Refer to the GPL (Gnu License) to determine this - its more a lega question than a technical one. Essentially Open Source requires that you continue to make it open source and that you include notifications of where it came from within what you do.
 
Old 10-24-2005, 03:19 PM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
Richard Stallman, the founder of the GNU project and FSF that creates Linux tools worked at MIT.
disliked the fact that big commercial firms took his work to make proprietary versions
started GNU
Gnu is Not Unix
however from a software point of view GNU is of course unix.
the distinction is a legal one and a very questionable legal one at that.

Linux kernel is also a permutation of Unix kernel because it implements a major amount of POSIX standards.

Flames about to begin but truth is truth

edit: often people start with the "no code in common" thing and while i do not believe it is valid to say that is the only issue i compare at randome ancient unix sysV ls.c and modern GNU ls.c from coreutils-5.2.1. The two programs don't of course compare at all nor should they . One is ancient history and the other is modern but i find some suprising similarities in variable names for instance from unix sysV. (i looked for like 5 seconds)
Code:
DIR *dirf;
struct dirent *dentry;
from GNU coreutils
Code:
register DIR *dirp;
register struct dirent *next;
it's lke DNA, it's evidence of kinship

Last edited by foo_bar_foo; 10-24-2005 at 10:38 PM.
 
Old 10-25-2005, 01:22 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
More detail:
System V is NOT open source. Most commercial variants of Unix (Solaris, HP-UX, AIX, True64, SCO) include some System V stuff. (Though Solaris recently released an open source version for x86.)
Actually, Solaris is based on System V R4, its version 10 is indeed released under an open source license, but this is not limited to x86, the same source tree build both the SPARC and the x86/x64 binaries.
 
Old 10-25-2005, 01:32 AM   #5
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Original Poster
Rep: Reputation: 30
And one more basic doubt:)

Is all the unix flavor's are purely depending on the FSF and GNU appilication?
Latest Linux kernal is incorporated with FSF and GNu appilication..But what abt command's and application of free and openBSD flavor's?
 
Old 10-25-2005, 02:18 AM   #6
danimalz
Member
 
Registered: Jul 2005
Location: West Coast South, USA
Distribution: debian 3.1
Posts: 267

Rep: Reputation: 36
why is this important to you....?
 
Old 10-25-2005, 03:06 AM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
All the unix flavors are certainly not depending on Gnu software, but many of them are including, optionally or not, a lot of gnu stuff.
 
Old 10-25-2005, 07:23 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Actually, Solaris is based on System V R4, its version 10 is indeed released under an open source license, but this is not limited to x86, the same source tree build both the SPARC and the x86/x64 binaries.
Actually you're not quite right. ORIGINALLY SunOS was Berkley derived and LATER added in SVR4. I did note in my original post that most commerical Unix has "System V" in it now. Solaris in fact retains Berkley stuff in it. Have a look at Solris' ucb/bin - 3 guesses what ucb stands for and the first 2 don't count. They have that because some of the original SunOS admins don't like the System V commands. Having worked on AT&T (and later NCR which AT&T bought and let run their computer side) SVR4 I was acutely aware of the differences in Solaris.

The deal with Unix/Linux is almost every good idea (and even some bad ones) that make it into one flavor will later make it into all the others. For example Sun came up with NFS & NIS and every variant has those avaialble now.
 
Old 10-25-2005, 12:17 PM   #9
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Quote:
Originally posted by foo_bar_foo

edit: often people start with the "no code in common" thing and while i do not believe it is valid to say that is the only issue i compare at randome ancient unix sysV ls.c and modern GNU ls.c from coreutils-5.2.1. The two programs don't of course compare at all nor should they . One is ancient history and the other is modern but i find some suprising similarities in variable names for instance from unix sysV. (i looked for like 5 seconds)
Code:
DIR *dirf;
struct dirent *dentry;
from GNU coreutils
Code:
register DIR *dirp;
register struct dirent *next;
it's lke DNA, it's evidence of kinship
I'm not sure I understand what your getting at here... Linux follows (or at least tries to follow) the POSIX standard which includes such things as the definition of the dirent struct. POSIX is an open standard defined in a way that people can actually implement the functionality in there system so that a program using the POSIX syscalls can easily compile and work from one POSIX OS to another.

The GNU code (like GNU's ls.c from coreutils) uses the standard POSIX syscalls and structs to do things. It is reasonable to expect something so simple as listing the files in a directory would have similarities if you looked at two implementations even if neither author saw the others work. In this case the variables name being the same isn't even that surprising as the name they both picked is the obvious and most descriptive name.

If you go to The Open Group's Specifications Issue and search for dirent you will see exactly what I mean.
 
Old 10-25-2005, 12:26 PM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Actually you're not quite right.
Please explain what is not quite right in my sentence.

Quote:
ORIGINALLY SunOS was Berkley derived and LATER added in SVR4.
Sorry, but this is innacurate.

SunOS 4 was indeed based on Berkeley distribution, but SunOS 5 *is* based on AT&T System V Release 4 code.
It is true SVR4 include a BSD compatibility layer and includes some of BSD features, but SVR4 is not an extension of BSD, it is an extension of SVR3, I mean the kernel and all core utilisties are System V, not BSD.

The only true part of BSD that was kept with Solaris 2 and wasn't in SVR4 was the ufs filesystem, which is certainly BSD based.
 
Old 10-25-2005, 12:39 PM   #11
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
4 came before 5 so my "orignally" seems correct.
 
Old 10-25-2005, 03:30 PM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You didn't answer my question, you quoted me:
Quote:
Actually, Solaris is based on System V R4, its version 10 is indeed released under an open source license, but this is not limited to x86, the same source tree build both the SPARC and the x86/x64 binaries.
telling something is not quite right there ...
Please tell me what it is.
 
Old 10-25-2005, 07:26 PM   #13
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
Quote:
Originally posted by foo_bar_foo

Code:
DIR *dirf;
struct dirent *dentry;
from GNU coreutils
Code:
register DIR *dirp;
register struct dirent *next;
it's lke DNA, it's evidence of kinship
I can't tell if this is a joke or not, but that is not similiar code...

'DIR' is a data type in C. The function opendir(3) returns a pointer to this type. See man 3 opendir.

'struct dirent' is another data type in C. A pointer to a struct dirent is returned for each directory entry (hence the name, dirent...). See man 3 readdir.

Trivial example of a basic ls program:
Code:
/* example */
#include <stdio.h>
#include <dirent.h>
#include <sys/types.h>

int main()
{
  DIR *dir;
  struct dirent *next;
  dir = opendir("/tmp");

  while(next = readdir(dir) != NULL)
    printf("%s\n", next->d_name);

  closedir(dir);
  return 0;
}
Again, I'll feel like an idiot if you were being sarcastic, but I'm just saying all of the coreutils are extremely easy to clone once you see their functionality. Tools like ls, cat, du, diff, find and others, an average C programmer does NOT need the source code to write clones of them.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unix Book for Beginners (Not Linux... Unix) suse2166 General 6 11-25-2004 11:46 AM
Which is best to install for a first time Linux user with NO UNIX knowledge or LINUX? chris24ang Linux - Newbie 13 05-16-2004 10:44 AM
UNIX (Linux, BSD, etc) Programming :: UNIX kuphryn Programming 8 04-04-2004 11:50 PM
Why did you experienced users of Unix change to unix over Windows? Laptop2250 Linux - General 11 10-28-2003 11:51 AM
How to schedule unix script periodically from unix os level??? gopi_20us Programming 2 03-11-2002 06:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:37 PM.

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