Welcome, Guest. Please Login
 
  HomeHelpSearchLogin FAQ Radified Ghost.Classic Ghost.New Bootable CD Blog  
 
Pages: 1 2 3 
Send Topic Print
Continued: Linux and Shell Scripting (Read 19518 times)
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Continued: Linux and Shell Scripting
Jun 28th, 2009 at 9:48am
 
Your guide mentions that the RPM package manager is better than apt-get. Why is that? What advantages does RPM have?

Are you familiar with both Debian-based and Redhat-based systems? Or do you specialize in one? Those are the two main flavors, right? Plus Suse.

I like the way your guide feels like a friend talking to you, focusing on the initial important points, cutting thru the clutter.

Also, how do you check/see if there are any updates to Ubuntu/Gnome/etc??

doesn't matter if you put the argument BEFORE the command??

eg

-l ls

when you type "cd" and hit <enter> key, that takes you to your "home" directory .. BUT that's isn't your /home directory, right?

kinda confusing terminology .. similar to "root" directory .. slash vs /root.
 
WWW  
IP Logged
 

MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #1 - Jun 29th, 2009 at 2:29am
 
Rad.in.UbuntuVM wrote on Jun 28th, 2009 at 9:48am:
Your guide mentions that the RPM package manager is better than apt-get. Why is that? What advantages does RPM have?

I meant that RPM is more powerful than Yum (rather than apt-get), although I should reword the guide because really yum and rpm work together.

I actually like apt-get better than yum/rpm because I feel like it is easier to find packages and it seems to do better at resolving dependencies.  However, I think RPM is still a great package manager and probably more powerful overall than apt-get.

Rad.in.UbuntuVM wrote on Jun 28th, 2009 at 9:48am:
Are you familiar with both Debian-based and Redhat-based systems? Or do you specialize in one? Those are the two main flavors, right? Plus Suse.

Ubuntu is my favorite desktop distribution, so I know debian-style systems well.  I've tried several other desktops distros but have come back to Ubuntu several times for its multimedia support and how easy it is to install and update.  Most everything works after install without have to manually configure anything and its easy to keep up with updates.

I also know Red Hat fairly well because it is one of the most popular distros to run a server on.  As a server, it is stable, easy to set up, and easy to manage.  The only reason I don't use Red Hat as a desktop is because I've had trouble with multimedia.  Basic sound and video isn't too hard, but transcoding video or advanced applications like MythTv don't seem to integrate well on Red Hat.

Suse is popular because it has the support of Novell.  The desktop felt bloated last time I tried it, and I've used it in a professional environment, so I don't know much about it.  They have contributed a lot of good things to the community, tho, like XGL graphics acceleration.

The other major flavor of Linux is Mandrake based distributions.  They aren't nearly as popular as Red Hat and Debian based systems.  Notable offshots of Mandrake are Linspire (formerly Lindows - the distro sold by Walmart for a short time,) and PCLinuxOS.

Besides the main flavors, there are several more independent distros.  Notable one's include Slackware, Linux From Scratch, and Gentoo.

Rad.in.UbuntuVM wrote on Jun 28th, 2009 at 9:48am:
I like the way your guide feels like a friend talking to you, focusing on the initial important points, cutting thru the clutter.

I've been told my writing style is conversational, which I take as a compliment.

What I tried to do with the guide is bring together enough information to get someone started in Linux and point them towards how to expand their knowledge.  I've never been 100% satisfied that it meets that goal, and as I learn more about Linux and get experience teaching it to new people, I see ways to improve the guide.  I hope to make some time to reorganize the guide this fall.

Rad.in.UbuntuVM wrote on Jun 28th, 2009 at 9:48am:
Also, how do you check/see if there are any updates to Ubuntu/Gnome/etc?? 

Ubuntu will notify you with an update icon that shows up near the clock.  The user experience is similar to Windows automatic updates (although it is much more obvious what is being updated and why.) 

You can also use the commands:
Quote:
sudo apt-get update
sudo apt-get upgrade

to fully update your system manually.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #2 - Jun 29th, 2009 at 2:35am
 
Rad.in.UbuntuVM wrote on Jun 28th, 2009 at 9:48am:
doesn't matter if you put the argument BEFORE the command??

Yes.  The command has to come first. 

Rad.in.UbuntuVM wrote on Jun 28th, 2009 at 9:48am:
when you type "cd" and hit <enter> key, that takes you to your "home" directory .. BUT that's isn't your /home directory, right?

Every user has their own home directory.  Think of it as your 'My Documents' folder in Windows.  Your home directory is usually named after your username, and contained with the /home folder.  So, my home directory is '/home/magoo'.  Yours might be '/home/rad' or whatever your login name is on your VM.

The root user's home directory is in a special place: /root

While the naming is a little confusing, that directory is different from the root of the file system, which is: /
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #3 - Jun 29th, 2009 at 2:42am
 
This Topic was moved here from PC Hardware + Software (except Cloning programs) by MrMagoo.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #4 - Jun 29th, 2009 at 2:42am
 
Just noticed our original thread is over 50 posts.  Splitting it up so nothing weird happens to it.
 
WWW  
IP Logged
 
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: Continued: Linux and Shell Scripting
Reply #5 - Jun 29th, 2009 at 2:13pm
 
MrMagoo wrote on Jun 29th, 2009 at 2:42am:
Just noticed our original thread is over 50 posts.Splitting it up so nothing weird happens to it. 

Thanks. I thought about doing the same. I'm so glad we got off that stupid Shared-Hosting account/server and now have a VPS with some decent horsepower to handle bigger files, cuz I think the overloaded Shared-Hosting server was at ythe root of those problems.

Learned today that Linux does not have/support file associations like Windows, in that a specific prgm is not assigned to open a specific file extension.

This was confusing because many (all?) of the files contained in the forum software DO have file extensions (such as *.pl (Perl) and *.log, *.lng (language), etc.), but I recall, early on that YaBB used to have *two* different downloads, one for Perl,that ended in *.cgi (e.g. Yabb.cgi) and another that ended in *.pl (e.g. YaBB.pl)..

.. so it's not exactly clear HOW these different files are handled and processed (is the correct term 'parsed'?) .. if Linux does not associate the different extensions with with different files types?
 
WWW  
IP Logged
 

Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: Continued: Linux and Shell Scripting
Reply #6 - Jun 29th, 2009 at 2:48pm
 
MrMagoo wrote on Jun 29th, 2009 at 2:29am:
I meant that RPM is more powerful than Yum

What is Yum? I think I recall using Yum with Ruby .. no?

MrMagoo wrote on Jun 29th, 2009 at 2:29am:
apt-get .. better at resolving dependencies

how do 'dependencies' work (in a nutshell)?

MrMagoo wrote on Jun 29th, 2009 at 2:29am:
RPM .. probably more powerful overall than apt-get.

How so? What features/capabilities make it more powerful? (kinda my original question)

MrMagoo wrote on Jun 29th, 2009 at 2:29am:
I hope to make some time to reorganize the guide this fall.

Google sees/notices updates and will give you (the guides/its pages) points for that. I know it's a lot more work than it seems.

MrMagoo wrote on Jun 29th, 2009 at 2:29am:
Ubuntu will notify you with an update icon that shows up near the clock.

Yeah, I've seen that, and that is what I was looking for, but saw no way to tell Ubuntu to "go look and see" if there were any updates.

MrMagoo wrote on Jun 29th, 2009 at 2:29am:
You can also use the commands:

Seems that once you learn the various commands, you know them for all-time, as they don't change (much?). In other words, it seems as if time spent learning Linux commands is time well spent (if you're going to be using Linux).

MrMagoo wrote on Jun 29th, 2009 at 2:35am:
Yes.The command has to come first.

Under NO circumstances can an option come BEFORE a program?? .. e.g.
$ -l ls
this will error?

MrMagoo wrote on Jun 29th, 2009 at 2:35am:
Every user has their own home directory. Your home directory is usually named after your username, and contained with the /home folder. So, my home directory is '/home/magoo'.Yours might be '/home/rad' or whatever your login name is on your VM.

Yes, you are correct. I see. I was getting confused with "/rad" being "my home directory" when "/home" is called/named "home". One is named 'home' while the other is the 'user home'.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #7 - Jun 29th, 2009 at 2:57pm
 
Rad.in.UbuntuVM wrote on Jun 29th, 2009 at 2:13pm:
Learned today that Linux does not have/support file associations like Windows, in that a specific prgm is not assigned to open a specific file extension.

Well, Linux doesn't use file extensions to manage it's associations, so it is completely different than Windows, but it does know what program to open most files with.  I don't know exactly how it does it.  Now that you bring it up, I realized I have always wondered exactly how it works, so maybe I'll study it a little today if I have time.

I know that any binary file just executes.  Also, most scripts (shell, perl, ruby, etc) have a special note in the first line of the program that tells the system how to execute it.  For example, the first line of a Perl program should be:
#!/usr/bin/perl
or something similar.

I think media files have meta-data contained in the file to help the system know if it is a video or music or whatever, but I'm not sure how the system knows it is a media file.  Maybe I can give you a better answer in a few days.

Rad.in.UbuntuVM wrote on Jun 29th, 2009 at 2:13pm:
This was confusing because many (all?) of the files contained in the forum software DO have file extensions (such as *.pl (Perl) and *.log, *.lng (language), etc.),

The file extensions used in Linux file names are for people to read, not Linux.  It is helpful to users of a computer for log files to have .log extensions and Perl files to have .pl extensions and so on, so you can see what the file is at a glance.  Linux doesn't care what the file name is.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #8 - Jun 29th, 2009 at 3:25pm
 
Rad.in.UbuntuVM wrote on Jun 29th, 2009 at 2:48pm:
What is Yum? I think I recall using Yum with Ruby .. no?

You can think of Yum as the Red Hat equivalent to apt-get.  For example, to install vim on Red Hat you might type "yum install vim".  Debian's equivalent to RPM is called Deb.  In my experience, RPM is more powerful than Deb because of the ability to run scripts before and after the package install and do lots of other things besides install packages.  Deb may have those capabilities, but my experience with it is limited.

Rad.in.UbuntuVM wrote on Jun 29th, 2009 at 2:48pm:
how do 'dependencies' work (in a nutshell)?

When you install an application, it might rely on the capabilities of other applications in order to work properly.  For example, MythTv needs MySQL in order to work correctly.  This makes MySQL a dependancy of MythTv. 

So, when you install MythTv with apt-get, it needs to see what dependencies MythTv has, then check to see which one's you have installed and install all of the dependencies you don't already  have.  Now, MySQL may have dependencies of its own that have to be installed before MySQL will work right, and its dependencies cold also have dependencies.  This sort of dependency chain makes installing a complex application like MythTv a very arduous process, and a lot of work has gone into package managers like apt-get to automate it all.

Rad.in.UbuntuVM wrote on Jun 29th, 2009 at 2:48pm:
Seems that once you learn the various commands, you know them for all-time, as they don't change (much?). In other words, it seems as if time spent learning Linux commands is time well spent (if you're going to be using Linux).

The commands change more if you change flavors of Linux (move from Debian based to Red Hat based, for example) than they change with time.  Once you learn them, they work pretty much the same forever.  When they do change, there is usually an option to use the old behavior so that people have plenty of time (several years) to learn the new ways before giving up the old. 

Shell commands are pretty universal between all of Unix/Linux, so those are definitely time well spent.  The location of various files and the system utilities are what changes when you move between distributions, so there is a learning curve when you switch but it is much much easier than learning Linux the first time.  You can switch distributions and be immediately productive, it just takes a few months to get comfortable with a new distro.

Rad.in.UbuntuVM wrote on Jun 29th, 2009 at 2:48pm:
$ -l ls
this will error?

Yes, that will error.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #9 - Jun 29th, 2009 at 4:00pm
 
Rad.in.UbuntuVM wrote on Jun 29th, 2009 at 2:48pm:
I know it's a lot more work than it seems.

I don't mind the work as long as I'm helping people get information that would be hard to get if my guide didn't exist. 

When I wrote my BitTorrent guide, BitTorrent was pretty new and lots of people had never heard of it or didn't know how it worked.  These days, you can find a bittorrent guide for just about every bittorrent client on every OS.  I don't like to be that specific.  I prefer to teach people to fish than to hand the fish to them, so I keep my guides more generally applicable.

Same thing with Spyware.  When I wrote that guide, there were computer savvy people with no idea why their computer was slow and why they got lots of pop-up ads.  These days, spyware is a household term and any decent anti-virus will check for it.  That guide in it's current form is past its prime, and I've been thinking about how it should look if I rewrote it.  People still need information on computer security, but I'm not sure what my unique contribution to that should be.

I'm pretty happy with the wireless guide.  There are parts I'd like to clean up to make what I'm trying to say a little clearer, and there are a few new related technologies (like Ethernet over Coax) that I'd like to include.  Other than that, I haven't found other guides that do a better job of explaining all the basics of operating a wireless network.  They all seem to leave something out or over-simplify.

I've always found the Linux guide difficult.  It's such a big subject that it's hard to bring someone from brand new to the point where they are productive in a guide that is short enough to hold their attention.  I tried to focus on topics that would cause roadblocks to getting going with Linux and give enough info that a reader would know how to get around those road blocks.  The other problem is how to stay general.  I want the information to apply to Linux in general, not any specific distro.  There are plenty of guides on how to install Ubuntu or Red Hat or whatever, so I want to teach people things that apply to all of Linux.  I'm glad I have something out there for people who are interested in it, but I wish I could get people off to a better start.

Like I said, I learn a little every day, so my perspective changes.  Linux changes too.  It is easier than ever for a new person to have a useful Linux system with distro's like Ubuntu.  So, hopefully I can make some improvements to the guide later this year.
 
WWW  
IP Logged
 
Rad
Radministrator
*****
Offline


Sufferin' succotash

Posts: 4090
Newport Beach, California


Back to top
Re: Continued: Linux and Shell Scripting
Reply #10 - Jun 29th, 2009 at 5:15pm
 
the 'cat' program/command displays the contents of a text file (e.g. *.txt, or *.html, etc.)

is 'cat' short for something?

i mean, it doesn't seem intuitive to remember (like cp or mv or rm or ls)
 
WWW  
IP Logged
 

MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #11 - Jun 29th, 2009 at 5:56pm
 
Rad wrote on Jun 29th, 2009 at 5:15pm:
is 'cat' short for something? 

It is short for concatenate.  The original use for the program was to concatenate two text sources (e.g. "cat textfile1 textfile2" would produce a single file with the contents of textfile2 pasted at the end of textfile1.) 

It just so happens that the default place for cat to put its result is stdout, which is usually your shell.  So, these days it is most commonly used to display the contents of a text file.  It is usually used with grep to narrow down what you are looking for.

For example:
"cat /etc/fstab | grep home"
would show you how your home directory is configured to be mounted at boot time.
 
WWW  
IP Logged
 
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: Continued: Linux and Shell Scripting
Reply #12 - Jul 6th, 2009 at 11:37pm
 
i am not clear on the concept of a mount point. can you explain how that works?

i am learning about many diff commands. what are the common ones you use most frequently?

it would seem that vi is a biggie, no? and that a familiarity with that is necessary, as you have already seemed to indicate.

what is the

Quote:
X.org version of the X Window System

what is your feeling of gnome vs kde?

what would you say is linux's biggest weakness?

what are linux's main strengths over windows, other than cost.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #13 - Jul 7th, 2009 at 12:08am
 
Rad.in.UbuntuVM wrote on Jul 6th, 2009 at 11:37pm:
what is your feeling of gnome vs kde?

I like Gnome better than KDE 3.5, but its just personal preference.  Gnome feels cleaner.  KDE 4.0 is out and is beautiful, but isn't ready for end-users just yet. 

Rad.in.UbuntuVM wrote on Jul 6th, 2009 at 11:37pm:
what would you say is linux's biggest weakness?

Lack of vendor support.  If I could run games in Linux, I'd never need Windows at home.  There are many applications people depend on that don't *just work* in Linux.  You can make many of them work, but that isn't good enough for the end user.  There is also still some hardware that struggles (as you have discovered with your wireless chip.)  Things have to *just work* to gain the approval of the masses (and even then sometimes it isn't easy enough,) and that requires some cooperation from vendors. 

Rad.in.UbuntuVM wrote on Jul 6th, 2009 at 11:37pm:
what are linux's main strengths over windows, other than cost.

To me, the cost isn't a big deal.  I'd pay more for Linux than I'd pay for Windows.  Linux is free in 2 ways - the cost of it is free (free as in free beer during happy hour,) and it is free for the user to do with as they please (free as in free s speech.)

To me, Linux's greatest strength is that it is free (as in free speech.)  I use it because I can do what I want with it.  I can install it anywhere and make it behave the way I want it to.  With Windows, you are stuck with the underlying system Microsoft has decided is best for you.  With Linux, you can swap out, change, remove, or add anything you like.  And, with a world-wide user-base, there are tons of applications and instructions for making your computer do almost anything. 

Between that and Linux's reputation for stability, it is quickly becoming the choice for everything from the Space Shuttle to smart phones (both Google's Android and Palm's WebOS are Linux-based, and the iPhone OS is BSD based.)

I'll try to answer the rest of your questions over the next day or so.  Some of them aren't easy to answer in a few sentences.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: Continued: Linux and Shell Scripting
Reply #14 - Jul 7th, 2009 at 12:17am
 
Rad.in.UbuntuVM wrote on Jul 6th, 2009 at 11:37pm:
what is the

Quote:
X.org version of the X Window System

Xorg provides the graphical environment for Linux.  It handles mouse interaction and graphical display.

http://www.x.org/wiki/

Gnome and KDE (and most other windows managers) are built on top of X.  You can use X by itself (without Gnome or KDE) but it is not a modern user interface by itself.
 
WWW  
IP Logged
 
Pages: 1 2 3 
Send Topic Print