Saturday, January 8, 2011

Linux Layers

This post is a back to the basics for understanding how Linux works.  For those of you just now migrating from Windows to Linux, this should help you understand the difference in concepts in the two operating systems.

Several years ago, Bill Gates, with the help of some other people, wrote DOS; Disk Operating System.  It was command line only, no graphics.  Then Windows came along.  It was a layer of graphic programming that "sat" on top of DOS.
Windows could not function without the bottom layer of DOS.  It was like 2 layers of a cake.  DOS on bottom, Windows on top.  Over the years,  the separation between layers has become fuzzy and the Windows part includes everything but the basic commands.  You can still run command line programs in Windows, if you know what you are doing. 
The top layer is the software, like MS Office, that interacts with the Windows program, and helps the user to be productive.

With Linux, the cake has more layers and they are distinctly separate, so far.
The bottom layer is Linux.  It will run by itself with no need for other layers.
It is command line only.  Some people build servers this way to cut down on the number of extra programs running in the background.
The next layer is the X-windows graphical interface.  It contains graphical programming to interface between a GUI (graphical user interface) desktop view and commands, and the underlying Linux operating system.
The next layer is the Desktop Window Manager.  It interacts with the X-windows system graphical interface, has the icons, mouse effects, screen savers, colors, etc.  Typically, it is KDE, Gnome, Xfce4, WindowMaker, Fluxbox, Ice, etc.      
The top layer is the software that will run on almost any Linux Desktop Window Manager.  Typically it is OpenOffice, Firefox, GIMP, etc.

I hope that helps you understand some of the basic differences in the two operating systems.

Next time, what is open source, and why it works.  

Have a good day.
Jim

Thursday, January 6, 2011

Reading Material

This will be a short but important post.  It is almost impossible to know every command, shortcut, and trick in any operating system and Linux is no different.  I recommend keeping a reference book handy on your desk.
The first book I go to is:

The Linux Pocket Guide by Daniel J. Barrett.
Essential Commands
Published by O'Reilly.
ISBN: 978-0-596-00628-0

It is written to cover Fedora Linux, but the information is valuable for all distros.  You should be able to find it online or at your local book store.

Also,
Learn to use "man" pages in Linux. 
At the command prompt, type:  man ls <enter>
You will see a manual for the ls (list) command.
This works with most commands in linux.

Read some each day and enjoy being part of the world-wide open source community.
Jim

Wednesday, January 5, 2011

Morning Coffee

As promised, this post is for you network/sysadmins that get to work early.
I was walking around and checking on machines every morning and even though I enjoyed the walk sometimes,  decided there should be a better way.
I check around 50 devices every morning this way.
So, with the idea of keeping it simple stupid (KISS), here is what you can do.

This is a simple program to run while you drink your morning coffee.  It will "reach out" to all of your networked servers, workstations, routers, printers, copiers, and anything else on the network.


Here is the premise.  Use the ping command to your advantage. 
[ping -c 2 mycomputer@mydomain.com]   will send out 2 pings to my computer@mydomain.com and wait for 2 replies for the standard wait time.
(Remove the brackets in the above line)
You can change the count to 1, if desired.  I always do 2 just to be sure.
If there is no reply and a timeout, the ping command will reply with "no packets received" or "0 packets received"  etc. 
Redirect the output to a text file and you have a morning report.
Overwrite the report each morning and there is no report cleanup at the end of the week. 


Use VI or similar text editor and make a file called:
start_ping_all.sh

Include the following code:
/home/<your files>/ping_all.sh > ping_report.txt
exit
#end


(The file path must be explicit)
This creates/overwrites a text file: ping_report.txt
--------------------------------------------------
Make another file named:
ping_all.sh

Include the following code:
ping -c 2 yourcomputer@yourdomain.com
#
ping -c 2 yournetworkprinter@yourdomain.com
#
ping -c 2 123.123.123.123


#END

If you are using DHCP, you will not have a static IP address, so you must use the full machine name.
If you are using static IP addresses, you can use the IP address.
Build the ping_all.sh file one time and edit as machines are deleted or added.
Run chmod 755 on both files to make them executable.


Run the program when you sit down with your first cup of coffee and you can read the report in a few minutes.  I check 50 pieces of hardware in about 5 minutes. 
Get ahead of the game in the mornings and enjoy the day.
Jim

Tuesday, January 4, 2011

A Good Place to Start

Linux can be easy and Linux can be very difficult.  It depends on which "flavor" or "distro" you choose.  There are: Fedora, Mint, Debian, Ubuntu, SuSE, Redhat, CentOS, Slax, Slackware, and more.  I just named some of the major distros.
There is also AMD64, i386, i586, i686, x86_64, and so on.  And then there are the desktops: KDE, Gnome, Xfce4, and several more.  I am just demonstrating that there are several choices and that can be confusing to a novice or mid-level Linux user getting ready to load their new box with a Linux distro. 

So, you bought the new hardware, have it all assembled and you are ready to load something.   Read the following sections and download the net install or live  iso file.  Burn it to a CD and boot your new box with it. 

Everything I say here can be checked out on wikipedia, google, etc.  The internet is a highly developed research tool.  Use it.

EASY
If this is your first time with Linux and you want everything to load automatically and run out of the box, then this section is for you.
Ubuntu and Linux Mint are easy to load, self configure, and have 95% of the bells and whistles for most users.  Linux Mint is reported to load and run well on laptops.  I use it on mine.

 MID LEVEL
The next level of difficulty will probably be: Fedora, SuSE, Debian, Redhat, and CentOS.  More user interaction required and a little more computer experience required.

 CHALLENGE
Some of the most difficult are Slax, Slackware, etc.  You should know computer hardware well, and be able to configure networking parameters, etc.  Many operating systems at this level require user interaction to compile.

EXTRA STUFF
Load the 32 bit systems unless you are running more than 4 GB of ram.
Load the 64 bit systems if you are building a server. 
KDE and Gnome are fully developed desktop managers.
Xfce4 is the new kid, runs fast, and is easier to support over a several machine environment.  (In my opinion and experience)

That is a very brief guideline for choosing which Linux distro you should choose.  Do your research, make a decision, and try it.  Don't be afraid to try something different. 

Next time, something for the network support person.  Make your computer work for you while you drink your morning coffee.
Have fun.
Jim

Monday, January 3, 2011

Practical-Linux

This is my first post, so bear with me for a few lines.  As an experienced network/computer guy, I have seen the good and bad of computing, in both the private and business sectors.  Computers are here to stay.  I like computers, but,  sometimes they get in the way of getting the real work completed, or they get in the way of human relationships, and so on.  You get the idea. 
Practical-Linux is my way of helping you past the eye candy and innumerable add-ons, to get the job done in a "tell it like it is" style. 

I started out on Bill Gates DOS back in 1990-1991.  I graduated to Windows 2.x, 3.x, 95, 98, and so on.  I taught NT Server 3.x at one of the local colleges for a while.  I attended a few Novell classes in the early 1990's when Novell 2.x came on 5 1/4" floppy disks.  I progressed to Novell 3.x and later 4.x. 
In the mid 1990's, I became aware of MS Access 2.0.  It was a great new idea back then.  I actually could call Redmond and talk to an Access design team member.  Paradox, Dbase, Access, SQL, etc were the database jargon of the day, and still are in some instances. 

In 1999, a customer handed me a floppy disk and said I needed to take a look at it.  It was a copy of Linux.  I loaded it and had to manually configure everything.  "Back to the basics" was my first thought.  I liked the raw feel of Linux.  I stayed with it and eventually converted 100% to Linux. 

Presently, I work at a University and support about 40 users, and 4-5 servers.  Most of it Linux.  A handfull of XP and Win7 machines thrown in for grins.  We run TCPIP, FTP, NFS, SSH, and a few other things.  All basic stuff that works very well when configured correctly.  All of the users run GUI desktops, productivity suite software, and so on.  

Bill Gates, Steve Jobs, Linus Torvalds, and others changed the way our world thinks, works, and plays.  So, that being said, I am here to have fun and help you make Linux decisions a little easier.
Let's have fun.
Jim