LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-21-2009, 05:57 AM   #1
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Rep: Reputation: 15
purest UNIX operating system?


I've been trying to understand some things to do with the UNIX, Linux relationship. My guess is that UNIX or C is the terminal system language of Linux, but how does this vary from distro to distro?

I've noticed that the syntax in some books varies slightly, some using # or ~ for root/superuser access access and $ for ordinary. Is there a good on line source for this?

Also, what is the purest UNIX o/s; FreeBSD, Solaris and in terms of learning terminal commands, would there be any difference between these and Ubuntu?
 
Old 06-21-2009, 06:45 AM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
some using # or ~ for root/superuser access access and $ for ordinary
AFAIK, ~ refers to the home directory of a currently logged in user (regardless of the fact whether it's root or an ordinary user):
Logged in as root ~ refers to /root directory. Similarly, if you are logged in as eg. john, ~ will point to /home/john.
 
Old 06-21-2009, 07:28 AM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
OK, let's take a shot at this: when you say UNIX, you're really talking about AT&T UNIX System V Release 4 (SVR4). Written almost entirely in C (there used to be a couple of assembly language pieces but those have pretty much gone the way of the dinosaurs), same with Linux -- the kernel is, pretty much, written in C (there may be some C++ stuff in there, I dunno, haven't looked lately, but essentially, the kernel in both SVR4 and Linux is C). Sun Microsystems Solaris operating system is SVR4 (as is, I believe, Apple's OS X and a few other offerings out there). For all practical purposes, it's difficult to tell the differences unless you dig deeply into the guts of the things.

Where you really see differences, though, is the utilities; the stuff you use all the time. GNU utilities (which almost all of them are in a Linux distribution) are not the same as AT&T versions -- GNU is an acronym for Gnu's Not Unix (and there's a whole philosophy surrounding that). The AT&T versions tend to be built around M. Douglas McIlroy's Unix Philosophy (roughly, a program or function should do one thing and do it well) where the GNU versions tend to add functionality (which some folks call "bloat"); human beings seem to be unable to leave well enough alone, methinks.

The pound sign, dollar sign thing (the terminal prompt) just goes back to the good old days when you worked on a Teletype and the command prompt let you know that you were working as the super-user (the pound sign) or as a non-privileged user (the dollar sign). The tilde is a shorthand for your home directory. UNIX was developed at Bell Laboratories on Teletypes; the reason many utility names are only two or so characters? It takes about ten pounds of pressure to type on a Teletype (and they're pretty much blaze along at about 30 characters per second on a good day). If you don't like the pound sign, dollar sign, you can assigned anything else you want to the environment variables PS1 and PS2; e.g., here's a section from /etc/profile that does that
Code:
# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
if [ "$SHELL" = "/bin/pdksh" ]; then
 PS1='! $ '
elif [ "$SHELL" = "/bin/ksh" ]; then
 PS1='${HOST}-${USER}-${PWD}: '
elif [ "$SHELL" = "/bin/zsh" ]; then
 PS1='%n@%m:%~%# '
elif [ "$SHELL" = "/bin/ash" ]; then
 PS1='$ '
else
 PS1='\u@\h:\w\$ '
fi
PS2='> '
export PATH DISPLAY LESS TERM PS1 PS2
I use Korn Shell, so my command line prompts are the "ksh" ones, PS1='${HOST}-${USER}-${PWD}: ', your mileage may vary.

So, what's "pure?" Well, nuthin, to be truthful; everybody adds something. BSD split off from AT&T's version (at about UNIX System 3, for lack of a better term), the Free Software Foundation (that's GNU) began building look-work alike utilities about then (we're talking early-to-mid 1980's here), a kid in Finland like what he saw in UNIX and sat down to write a look-work alike (and we all know how that turned out), SCO bought UNIX from AT&T (and that doesn't seem to be working too well), and the lowest common denominator (anything made by Microsoft) dominates, sigh. About as close as you're going to get is Solaris; in the Linux world, Slackware is the most un-fooled-around-with Linux distribution (I bounce back and forth between Solaris and Slackware and it's hard to tell the difference most of the time). Ubuntu? Well, Ubuntu does a lot of things for you and some folks find that annoying; for here can be interpreted as to; my personal opinion (for whatever that's worth) is that Ubuntu is excellent for folks migrating from Microsoft to a real operating system, nothing wrong with it, kinda nice, but...

It all gets down to you and what you want; Linux gives you the opportunity to try a distribution and if you don't like it for whatever reason, go try another distribution. Once you're comfortable with the utility set and can get around and do things, you'll start to notice the subtle differences from one to the next and you'll settle on something you're comfortable with.

If you're interested in pursuing this, you can look at and download source code for various versions of UNIX from links at The UNIX Heritage Society (http://www.tuhs.org) and The Heirloom Project (http://heirloom.sourceforge.net/index.html), where you can download almost all the standard SVR4 utilities and build them on your Linux system; kinda cool, that one.

Hope this helps some.
 
Old 06-21-2009, 07:54 AM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by tronayne View Post
It takes about ten pounds of pressure to type on a Teletype (and they're pretty much blaze along at about 30 characters per second on a good day).
That good day must have been long after Unix was invented. When Unix was invented Teletypes were strictly 10 CPS.

30 CPS devices that were otherwise almost compatible with Teletypes were invented years later.

Teletypes had 7 bit characters in 11 bit frames at 110 bits per second. Those later devices had 7 or 8 (depending on model) bit characters in 10 bit frames at 300 bits per second.

I'm not sure what you mean by ten pounds of pressure. The pressure at which you needed to press the keys of a Teletype was more than required on an electric typewriter, but far less than needed on a mechanical typewriter and certainly not ten pounds. Any 30 CPS model I ever saw had exactly the keyboard characteristics (pressure, tactile feedback, etc.) of a standard electric typewriter, which means too little key pressure rather than too much. As keyboard ergonomics improved, the keyswitch pressure on a good quality keyboard has become slightly higher than on an electric typewriter from the 60's or 70's, not lower.

Last edited by johnsfine; 06-21-2009 at 07:59 AM.
 
Old 06-21-2009, 08:56 AM   #6
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
AT&T Unix was sold to Novell (and who still own the rights ... which SCO found out the hard way).
Prior to that AT&T and SUN did some worked together.
BSD was spun off from AT&T Unix very early on.

The "terminal system" is governed by the shell (command interpreter) that is running.

Korn (ksh), Bourne (sh), Bourne again (bash), C shell (csh) ... etc.
 
Old 06-21-2009, 09:01 AM   #7
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Oh, duh! A slip of the synapses, I suppose -- yeah, 110 baud, 10 CPS, slower than the average typist, oiled paper tapes (kind of nice for "long-term storage" and "program loading"). The ASR 33's that I used caused a whole lot of fatigue after a few hours of whacking away at the keyboard and... ten pounds? Well, sure seemed like it at the time (especially compared to an IBM electric typewriter or a Royal manual). Moving on up to an Anderson-Jacobsen with those daisy-wheel heads, forms tractor and, holy toot, 1200 baud... ah, heaven.

Still miss those things.
 
Old 06-21-2009, 10:35 AM   #8
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Original Poster
Rep: Reputation: 15
purest UNIX operating system?

Wow, what responses. To think that this time last year, I thought Microsoft was the best operating system in the world. Now, I'll choke if anyone mentions them...

Having migrated from XP to Ubuntu, which is a really good system for beginners (probably the best for this), as well as having tried Puppy which is great for low RAM pc's, it is now time to look for something different.

I'm definitely going to take into account these postings and try out some new o/s' and no doubt will be back again on the forum. It's ashame Microsoft wasn't beaten in the personal pc market by Linux/UNIX. We would have all been spared wasted life moments and general irritation...
 
Old 06-21-2009, 04:54 PM   #9
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Why do you ask about unix anyway? I don't remember the whole history of unix/linux, but as far as I know, you'll be better off having any linux distro on your desktop. Correct me if I'm wrong, but if someone is interested in unix now (we're talking about private desktops), it must be only for historical purposes. As I said, I might be far from the truth, but that's my impression (having used linux for the last 4 years)
 
Old 06-22-2009, 05:19 PM   #10
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Original Poster
Rep: Reputation: 15
purest UNIX operating system

I was just really interested in the Linux/Unix connection and have noticed that Solaris and BSD don't seem to categorise themselves as Linux, rather more as UNIX.
 
Old 06-22-2009, 07:26 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, here's a graph/map of Linux derivatives: http://www.kde-files.org/CONTENT/con...218-gldt76.png
There's a load of history, inc derivative graphs for Unix here: http://www.levenez.com/unix/
 
Old 06-23-2009, 10:05 AM   #12
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by tigertim71 View Post
I've been trying to understand some things to do with the UNIX, Linux relationship. My guess is that UNIX or C is the terminal system language of Linux, but how does this vary from distro to distro?

I've noticed that the syntax in some books varies slightly, some using # or ~ for root/superuser access access and $ for ordinary. Is there a good on line source for this?

Also, what is the purest UNIX o/s; FreeBSD, Solaris and in terms of learning terminal commands, would there be any difference between these and Ubuntu?
What you call the terminal system language is determined by the shell you use. On most linux distros that's bash, but there are others like ksh, csh (and many derivatives), zsh and some others. These has nothing to do with C (other than the fact that some -all?- of them are programmed in C themselves). The only one whose syntax resembles in some way to C is csh. But it isn't -by any means- compatible at syntactical level with C. It wouldn't make much sense for a command interpreter anyway.

As for the symbols used for the prompt, that's merely a graphical thing that can be changed at your desire. It's the convention to use # for root adn $ for regular user (~ is used to mean $HOME, the home dir). But it can really be set to any other thing you like.

There are a number of OSes which are derived conceptually from the original AT&T unix, however, Linux Is No UniX. It's just a free kernel that someone built to act in a similar way to this of UNIX, including POSIX complicance and a similar paradigm that built strongly based around the concept of files and the file system.

There are a number of commercial UNIXes, and lots of different OSes that resemble UNIX to a bigger or lesser degree. I'd say that between the free ones, Solaris is the closest you can get. BSD's are near enough, and Linux is different enough. There are many more.

Ubuntu is just a distribution of Linux, which has a Linux kernel and a lot of -mostly GNU licensed- tools that together build an OS. There are many more of these as well.

As for the differences between the tools, well, most UNIXes use either the original posix tools or at least tools of their own that are compatible with the original posix ones.

Most GNU tools -which are what linux uses instead- are a superset of the functionality of the original equivalent posix tool, but in any case they retain the posix compatibility as a subset because that's what any long-lived script will expect. That's done that way to retain portability between different unix clones. And of course, that also eases the life of the regular user when dealing with the command line. It's just easy to work when the tools always work like you expect them to.

When reading a man page in linux you will often find comments about the original posix functionality and behavior, about parameters that are even retained with no real functionality just for the sake of compatibility, and about GNU extensions which might not work on other UNIXes that use the posix toolset.

Quote:
Originally Posted by sycamorex View Post
Why do you ask about unix anyway? I don't remember the whole history of unix/linux, but as far as I know, you'll be better off having any linux distro on your desktop. Correct me if I'm wrong, but if someone is interested in unix now (we're talking about private desktops), it must be only for historical purposes. As I said, I might be far from the truth, but that's my impression (having used linux for the last 4 years)
There are many unixes that can be used as personal desktops, but I usually just advice to go linux for that. Even today, the hardware support (overall the the newest technologies) is far better and comes much sooner into the linux kernel.

In which regards regular programs, most of the userland software is ported soon enough, a big part of it is developed with both OSes in mind and might even be released at the same time for both. Still some thing might lag behind.

Quote:
Originally Posted by tigertim71 View Post
I was just really interested in the Linux/Unix connection and have noticed that Solaris and BSD don't seem to categorise themselves as Linux, rather more as UNIX.
Well, the pre-requisite to qualify to be a linux distro is to use a linux kernel. BSD's do have their own kernel, which are built from the ground and have absolutely nothing to do with the linux kernel.

I just see them all as a galore of clones of the original UNIX, linux relates less closely, BSD's relates more directly, and Solaris and some other commercial unixes relates even more closely.

However, I am admittedly no expert in either solaris, bsd's nor any other unix clone. I've only used them in the university as a user, and not as an administrator. So someone might have a different opinion about that.

In any case, as said, bsd's have absolutely nothing to do with linux, at all.

Last edited by i92guboj; 06-23-2009 at 10:07 AM.
 
Old 06-23-2009, 12:13 PM   #13
tigertim71
Member
 
Registered: Oct 2008
Location: London, England
Distribution: Puppy
Posts: 93

Original Poster
Rep: Reputation: 15
purest UNIX operating system

Thanks to all for this.

i92guboj - I'm beginning to get a better understanding of this from your post.

The whole history of this is quite interesting really and at least as users, we are now spoilt for choice on free software, and can try out and assess the various operating systems on virtual programs before installing.
 
Old 06-23-2009, 01:23 PM   #14
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Yep. That's true.

The thing about linux (which is maybe why it's more famous and extended than others) is that it's a very generalist OS. It can do lots of things very well and lots of things acceptably, while supporting the majority of the hardware available to one or another degree. This is what desktop users expect from a modern OS.

Other UNIX clones are maybe less generalist, but can do some things better (or at least, some people think so). BSDs are commonly named because of their security and stability. But even amongst BSDs you can find very different models. OpenBSD for example is centered about these principles of stability and security. Others like FreeBSD are more generalist, while still offering many of the advantages of BSDs in general. NetBSD instead has the advantage that it runs on a wide range of architectures, from huger server machines to some embedded devices. Linux can do all of this without a problem, whether it's good enough or not, better or worse or whatever else... that's open to discussion as always.
 
Old 06-23-2009, 02:11 PM   #15
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
Quote:
Originally Posted by tigertim71 View Post
I was just really interested in the Linux/Unix connection and have noticed that Solaris and BSD don't seem to categorise themselves as Linux, rather more as UNIX.
Solaris is UNIX
BSD is UNIX
Linux is UNIX

As was mentioned the purest /1st was AT&T. BSD came along shortly thereafter.

Any of these OS's will carry with them the core UNIX command set. So you can learn the basics from any of them. I can see where it would be hard to know that rpm's were not a original part of UNIX but awk was. To me RPM's came along to make things easier to install and update software with the proper versions so that things worked together. Nowdays things are so interdependent that things like dependencies have to be taken into consideration much more than 30 years ago.

Before Linux I worked on AT&T, HPUX, SUN-OS, Solaris and AIX. If you can work on one you can work on any of them. They all have their home grown goodies but the core commands are the same. Most of these core commands exist on all flavors of Linux. IMHO Solaris is no more pure than HPUX or AIX or Red Hat Linux / CentOS etc. Pick one. I really don't think you can go wrong. The better you get to know any one flavor it will make it that much easier to learn any UNIX derivative.

ps. I saw some AIX servers for 60 bucks on Ebay that came with the AIX OS. Cheap way to learn UNIX with a little of IBM's tidbits tossed in. (AIX is IBM's UNIX flavor).

Last edited by DotHQ; 06-23-2009 at 02:13 PM.
 
  


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
Default user accounts in Unix Operating system srihariv Linux - General 2 03-31-2008 06:43 AM
Unix server operating system nency.jariwala Linux - Server 9 10-20-2007 05:18 AM
Unix or Linux operating system seamalady Linux - General 3 05-05-2006 08:04 AM
I'm looking for the original UNIX operating system dinolinux General 17 08-18-2005 12:45 PM
installing Unix with no Operating System to start off nchauhan *BSD 11 06-26-2003 08:54 AM

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

All times are GMT -5. The time now is 09:13 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