Rotate Gumstix Overo Touch screen

Go to u-boot environment settings,

Overo # setenv mmcargs setenv bootargs console=${console} mpurate=${mpurate} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.debug=y omapdss.def_disp=${defaultdisplay}  omabfp.rotate=1 root=${mmcroot} rootfstype=${mmcrootfstype}

Overo # saveenv
Overo # reset

ps: 1 --- 90°     2 --- 180°     3 --- 270°

Several month later when I tried to rotate my another gumstix fire + LG4.3" screen, it doesn't work!

finally, I found at this time, the default dvimode was 1024x768. I have to change it back to 4.3" screen resolution, which is 480x272.



Gumstix Overo Fire Wifi setup

1. Take a look available wireless signal:

root@overo:~# iwconfig wlan0 essid any
root@overo:~# ifconfig wlan0 up
root@overo:~# iwlist wlan0 scan

2. Edit /etc/network/interfaces to include a section which looks like:

a) Unencypted wifi

Some default builds do not enable any Wifi. You may need to edit /etc/network/interfaces to include a section which looks like:

allow-hotplug wlan0                                                             
auto wlan0
iface wlan0 inet dhcp
pre-up /sbin/iwconfig wlan0 essid any
wireless_mode managed 
The problem is this setup is not reliable! we're waiting for a solution.

b) WEP encryption

Edit /etc/network/interfaces to have only for wlan0 (don't touch the other entries):

iwconfig wlan0 essid "My Wireless Network"
iwconfig wlan0 key my-hex-key
ifdown wlan0
ifup wlan0

c) WPA encryption

Edit /etc/network/interfaces to have only for wlan0 (don't touch the other entries):

allow-hotplug wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
down killall wpa_supplicant

There is an error in the current /etc/network/interfaces as of 2011-09-25. The pre-up line reads:

pre-up wpa_supplicant -Dmarvell -iwlan0 -c/etc/wpa_supplicant.conf -Bw 

The "-Bw" causes a usage message to be dumpted to the screen. Make sure it is just "-B". The -Dmarvell option will yield the message "Unsupported driver 'marvell'. Change it to "-Dwext" as shown above.
My /etc/network/interfaces came this way from the factory, and was also that way in my build from the latest git.

Create /etc/wpa_supplicant.conf containing:


proto=WPA2 # try WPA RSN if you WPA2 fails
pairwise=CCMP TKIP

3. Connect to network

To connect to the wireless network when the configuration is done, do the following:

Take down the wireless network (it might already be down, but try to be sure):

# ifdown wlan0
Then, bring it up again: 
# ifup wlan0
4. Power management:
Many users have reported issues with wifi data throughput being limited to about 100kB/second. It is theorized this is due to lack of SDIO IRQ support in the OMAP3 MMC driver. A patch is being investigated which reportedly achieves 13Mbps.
Additionally, the driver does not support power management at present. The use of iwconfig power commands such as the following will fail: 

iwconfig wlan0 power on 

Therefore, the wifi module always consumes close to 1 Watt of power when turned on.



How to Perform a Windows XP Repair Install

It is extremely important that you backup important data that is not available from other media sources. This backup should be located on a separate hard drive, CD, DVD, network storage, etc. that will not be affected by the repair install. 
Please check out the warning links before attempting the Repair Install. It is to your advantage you follow the suggestions to prevent data loss and especially if you also have the capability to boot into XP, perform the steps listed in the Warning #1 , before proceeding with the repair install.
After completing [if Windows is still accessible] the steps listed to prevent data loss in warning #1 and you did not remedy the no boot situation, you can use an OEM XP Pro or Home, "retail" XP Home or Pro full or upgrade version CD of the same version Home or Pro to perform a Repair Install.  OEM Restore disks or hidden restore folders on the hard drive will not work for the Repair Install. A Repair Install will replace the system files with the files on the XP CD used for the Repair Install. It will leave your applications and settings intact, but Windows updates will need to be reapplied.
A Repair Install will replace files altered by adware and malware, but will not fix an adware, malware problem.
You can use the In place upgrade option to change a Product Key in the event you entered a key that was already activated. The In Place Upgrade also produces the same result as the Repair Install.
Alternate options to Change XP Product Key #18 on the FAQ list.
Setup cannot continue because the version of Windows on your computer is newer than the version on the CD.
If you get a "Setup cannot continue because the version of Windows on your computer is newer than the version on the CD." message, if you continue, you will need to apply the SP 2 updates after the repair install completes, plus you will need to take the following steps to keep your system from being immediately infected with a virus.
1. If you connect directly to the internet without a router or hardware firewall, disconnect from the internet by physically removing the connections cable, removing a wireless card, or any other means of internet connection.
2. After the Repair install is completed, enable the XP firewall or install third party firewall software or router before connecting to the internet.
If you get the "Setup cannot continue because the version of Windows on your computer is newer than the version on the CD.". You should create a slipstreamed copy of your XP CD by using the software and step by steps supplied in the links below.
Slipstream XP
Automatic Updates
If you cannot download Automatic updates after the Repair install , follow the steps in the link below submitted by MS-MVP's Richard Harper and Ron Martell.
Automatic Updates stops working after a repair install of Windows XP 

XP Repair install Please read carefully and make sure you followed the warning links before initiating the Repair Install. You can print a text version for reference. repair.txt
  1. Boot the computer using the XP CD. You may need to change the boot order in the system BIOS so the CD boots before the hard drive. Check your system documentation for steps to access the BIOS and change the boot order.
  2. When you see the "Welcome To Setup" screen, you will see the options below   This portion of the Setup program prepares Microsoft
       Windows XP to run on your computer:

       To setup Windows XP now, press ENTER.

       To repair a Windows XP installation using Recovery Console, press R.

       To quit Setup without installing Windows XP, press F3.

  3. Press Enter to start the Windows Setup.
    To setup Windows XP now and Repair Install , press ENTER. do not choose "To repair a Windows XP installation using the Recovery Console, press  R", (you Do Not want to load Recovery Console). I repeat, do not choose "To repair a Windows XP installation using the Recovery Console, press  R". 
  4. Accept the License Agreement and Windows will search for existing Windows installations.
  5. Select the XP installation you want to repair from the list and press R to start the repair. If Repair is not one of the options, END setup. After the reboot read  Warning#2!
  6. Setup will copy the necessary files to the hard drive and reboot.  Do not press any key to boot from CD when the message appears. Setup will continue as if it were doing a clean install, but your applications and settings will remain intact.  If you get files not found during the copying stage.
    Blaster worm warning: Do not immediately activate over the internet when asked, enable the XP firewall before connecting to the internet. You can activate after the firewall is enabled. Control Panel - Network Connections.  Right click the connection you use, Properties and there is a check box on the Advanced page.
    KB 833330u Blaster removal
    What You Should Know About the Sasser Worm and Its Variants
    Microsoft Security Bulletin MS04-011
  7. Reapply updates or service packs applied since initial Windows XP installation. Please note that a Repair Install using an Original pre service pack 1 or 2 XP CD used as the install media will remove SP1/SP2 respectively and service packs plus updates issued after the service packs will need to be reapplied. Windows XP Service Pack 1
    Service Pack 2
    An option I highly recommend; is creating a Slipstreamed XP CD with SP1, SP2, etc. .
    Slipstreaming Windows XP with Service Pack 2 (SP2) Good
    Another Slipstream step by step Better
    AutoStreamer mirror link for AutoStreamer  Best!!
    Step by Step on AutoStreamer
    Printable Repair Install step by step. repair.txt
    XP Repair Install in PDF XPrepairinstall


Warning! #1

Should you do a repair install and is it the best choice?

A Repair Install is not foolproof and should not be considered the cure-all fix for non-boot situations.

Manually delete the Undo_guimode.txt file from the Windows\System32 folder before you perform any of the actions that are listed in the "Symptoms" section of this article. To do this in Windows XP, type the following command at a command prompt:
del /a /f %windir%\system32\undo_guimode.txt
  1. From the Start menu, click Run. See screen shot Image
  2. In the Run dialog box, in the Open text box, type: cmd. Click OK.
  3. Delete the undo_guimode.txt file. In the C:\Windows\System32\cmd.exe dialog box, type: del /a /f c:\windows\system32\undo_guimode.txt. Press the ENTER key. See screenshot Image
KB Q312369
Check the link below for an option for recovering from a non-boot event. Windows XP Crashed? Here's Help
A salvage mission into the depths of Windows XP, explained by a non-geek

Also as a precaution the windows\system32\WPA.DBL  and WPA.BAK should be copied to a floppy before doing a repair install. For more information see Alex Nichol's  article on XP activation.

Additional tips to perform before initiating the Repair Install.
You should complete the basic requirements of backing up all files and folders that cannot be restored from other media. This includes passwords, applications purchased and downloaded from the internet without CD support, financial records and folders, digital images that cannot be replaced...............
Backup copies of your registry files (in the %systemroot%\Repair folder) are also replaced after the in-place upgrade is complete.  Copy these registry backups to another location before you perform an in-place upgrade/Repair Install.  You may need to use them after the in-place upgrade is complete.
It would also be a good idea to run the Files And Settings Transfer wizard F.A.S.T located on the XP CD.
If you made unorthodox registry changes with third party software, there is the potential of data loss from a Repair Install. Another consideration of concern would be a power failure during the repair install could render your system un bootable and result in loss of data.
The likelihood of you losing the files and folders is probably of minimal risk, but you have to expect the worst and make sure you are prepared for recovery.
If you are sure you have explored all other troubleshooting avenues, then proceed with the repair install.
If you get a warning message: "Setup cannot continue because the version of Windows on your computer is newer than the version on the CD."
You get this message when you use a pre-SP 1, SP2 XP CD on an XP installation that has been updated to SP1, SP2.
You have the options listed below.
  1. Remove the SP 1, SP2 update if the option is available from Add/Remove.
  2. Create a slipstreamed XP CD merging the SP1 or SP2 update.
    2a Autostreamer for creating a slipstreamed CD the easy way.
  3. Purchase an XP CD with SP2 included.
Slipstreaming Windows XP with Service Pack 1 or 2 (SP1, SP2)
Another Slipstream step by step
AutoStreamer mirror link for AutoStreamer 
Step by Step on AutoStreamer

Warning!! #2

If the Repair Option is not Available

What should I do? Most important do not ignore the information below!
If the option to Repair Install is NOT available and you continue with the install; you will delete your Windows folder and the Documents and Settings folders.  All applications installed that place keys in the registry will need to be re-installed and will require the original install media.
You should exit setup if the repair option is not available and consider other options. I have found if the Repair option is not available, you have a few paths I have listed below to try before XP  requires a Clean install.
Another option to consider (since the cost of 100 + gig hard drives has dropped to well under $75) would be to disconnect the current hard drive and install a clean XP from retail disks or restore media to a new hard drive. You can then connect the original hard drive after configuring the jumpers to a slave drive. You can retrieve important files. One thing to remember, if a hard drive has not been formatted or written over by reinstalling, the data is accessible. The less you access a hard drive after a non-boot episode; the better your chances of retrieving your data.
Very important!!
If you still have the ability to access the Windows XP installation, backup all important files not restorable from other sources before attempting any recovery console or other trouble shooting attempts.
Possible Fix by reconfiguring boot.ini using Recovery Console.
 1.Boot with XP CD or 6 floppy boot disk set.
 2. Press R to load the Recovery Console. 
 3. Type bootcfg
 4. This should fix any boot.ini errors causing setup not to see the  XP OS
 5. Try the repair install.

One more suggestion from MVP Alex Nichol
"Reboot, this time taking the immediate R option and if the CD letter is say K: give these commands

copy K:\i386\ntldr C:\
copy K:\i386\ C:\

(two other files needed - just in case)
1. Type: attrib -h -r -s C:\boot.ini del C:\boot.ini
2. Type: BootCfg /Rebuild

which will get rid of any damaged boot.ini, search the disk for systems and make a new one. This might even result in a damaged windows reappearing; but gives another chance of getting at the repair"


Load Gumstix Libraries

1) Install rsync pakage:
$ scp /build/czhang/overo-oe/tmp/deploy/glibc/ipk/armv7a/rsync_3.0.6-r0.6_armv7a.ipk root@

$ opkg install rsync_3.0.6-r0.6_armv7a.ipk

2) Install Qt lib:
$ rsync -av czhang@* /usr/lib

3) Install serial port lib:
$ rsync -av czhang@* /usr/lib

4) Install qwt lib:
$ rsync -av czhang@* /usr/lib

4) Install sqlit3 lib:
$ scp czhang@x.x.x.x:/build/czhang/qt-everywhere-opensource-src-4.7.0/plugins/sqldrivers/ /home/m4/sqldrivers

5) Install qzip lib:
$ rsync -av czhang@* /usr/lib

6) Install Analogwidget lib:
$ scp /build/czhang/qt-everywhere-opensource-src-4.7.0/projects/AnalogWidgets/analogwidgets/ root@



Create an Application Shortcut to Open Nautilus as Root in Ubuntu

$ sudo nano /usr/share/applications/Nautilus-root.desktop

Paste the following text in the editor that comes up in Terminal:

 [Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksudo nautilus

 Hit Ctrl+X  then Y



User Management

Create a user:
$  useradd tech

Add password:
$ passwd tech
Enter new UNIX password:
Retype new UNIX password:

Direct user to a preferred directory when the user log on:
usermod -d /home/tempdir/ tech


Gumstix touch screen problem

I re-installed file system (2Gb SD card) for my Overo gumstix. After i booted from SD, I found the touch screen did not work. So, I had a look in /dev/input directory. I can only see 'mice' in this folder, no 'touchscreen0'.

Then I tried different way to solve the problem. I tried:
$ nand erase 240000 20000
$ reset

When I booted gumstix, the back light of screen turned on, but nothing displays on the screen.  I can see 'touchscreen0' in /dev/input.  I tried '/usr/bin/ts_test'. This command can detect the position when i touched screen, but just no display.

I thought my screen was faulty.

After that, I took a look the u-boot environment:

# printenv

DVI? The touch screen I am using is LCD!

Ok, changed it to:
# setenv defaultdisplay lcd43
# saveenv
# boot

Haha, screen is working.


Install AnalogWidget in Ubuntu / Gumstix

Install in Ubuntu:

System spec:

Ubuntu 10.04 (lucid)
2.30.2 (Ubuntu 2010-06-25)
2.6.32-33-generic (#70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011)
4.4.3 (x86_64-linux-gnu)

Download from here:

unzip it.

$ cd /home/czhang/Downloads/AnalogWidgets
$ qmake
$ make
$ sudo make install
$ cp  /home/czhang/Downloads/AnalogWidgets/analogwidgets/ /home/czhang/QtSDK/QtCreator/lib/qtcreator/plugins/designer/

In .pro file, added:
LIBS += /home/czhang/Downloads/AnalogWidgets/analogwidgets/
INCLUDEPATH += /home/czhang/Downloads/AnalogWidgets/analogwidgets/analogwidgets

Install in Gumstix:

unzip under:

$ qmake
$ make

got some error messages according to file:

I edited these two files:
in channel.cpp
void Channel::setType(unsigned int i)
//if (i!=Line && i!=Dots)
// throw "Bledny typ";

m_type = i;


in scriptwidget.cpp:
void ScriptWidget::setScript(const QString & s)
m_script = s;
qDebug("ScriptWidget::setScript() %s",qPrintable(m_script));
QFile file(m_script);
if ( QIODevice::ReadOnly ))
QString src = QString(file.readAll());
QScriptValue widget = m_engine->newQObject(this);
QScriptValue v = m_engine->uncaughtException();

if (v.isValid())
qDebug("Error %s",qPrintable(v.toString()));
//catch (std::exception & e)
// qDebug("Wyjatek %s",e.what());
}// setScript

$ scp /build/czhang/qt-everywhere-opensource-src-4.7.0/projects/AnalogWidgets/analogwidgets/ root@


Disable gumstix overo console login message on ttyS2

In my design, I need to use second serial port (ttyS2) on overo.
I connected SDA3 (pin 24 on chestnut43 board) to WinXP hyperterminal, and booted up Overo.
I saw all booting messages are showing in hyperterminal.

Login timed out after 60 seconds.                                               
|       |                  .-.                                                   
|   |   |-----.-----.-----.| |   .----..-----.-----.                             
|       |     | __  |  ---'| '--.|  .-'|     |     |                             
|   |   |  |  |     |---  ||  --'|  |  |  '  | | | |                             
'---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'                             
                -'  |                                                           
The Angstrom Distribution overo ttyS2                                           
Angstrom 2010.7-test-20101005 overo ttyS2                                       
overo login: root                                                               
 |  '  | | | |                                                                   
'---'---'--'--'--.  |-----''----''--'  '-----'-'-'-'                             
                -'  |                                                           
The Angstrom Distribution overo ttyS2                                           
Angstrom 2010.7-test-20101005 overo ttyS2                                       


Then, I run my program (written by Qt), the hyperterminal shows as follow: 

QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 
QIODevice::read: Called with maxSize < 0 

in the meantime, the string which sent from Qt program also shows in the screen. 
I only want ttyS2 send the information from my program, not other messages.

With help from Nabble forum, the following is my solution:

Those messages are from the kernel.  U need to change the "console" uboot environment variable, otherwise the kernel will print messages on that serial port.

Take a look at uboot environment variable. to do this ,  boot gumsix, pushed any key to stop it booting from MMC. Then use "printenv" list all u-boot variables. 
Overo # printenv 
bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimagei 
nandargs=setenv bootargs console=${console} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.d2 
loadbootscript=fatload mmc 0 ${loadaddr} boot.scr 
bootscript=echo Running bootscript from mmc ...; source ${loadaddr} 
loaduimage=fatload mmc 0 ${loadaddr} uImage 
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${loadaddr} 
nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} 280000 400000; boot} 
bootargs=console=ttyS2,115200n8 i2c_bus=${i2cspeed} vram=12M omapfb.mode=dvi:1024x768MR-16@6t 
mmcargs=setenv bootargs console=${console} i2c_bus=${i2cspeed} vram=12M omapfb.mode=dvi:1024t 

Environment size: 1279/131068 bytes 

the "console=ttyS2,115200n8" means send console login messages to ttyS2.

After that, take a look at /etc/inittab in mmc system on 2G SD card.
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.

# What to do in single-user mode.

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
S:2345:respawn:/sbin/getty 115200 ttyS2
# /sbin/getty invocations for the runlevels.
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
# Format:
#  :::

1:2345:respawn:/sbin/getty 38400 tty1

The last line sets up a login on tty1.  If you have a keyboard (eg. USB keyboard via a powered HUB)  and display connected, then you'd be able to login using those.  I am using a chestnut43 board with LCD, and i can use tty1 on a couple of occasions when I messed up the networking.

the command to change console environment variable are follows:

# setenv console tty1 
# saveenv 
The console setting is passed to the kernel at boot time.  It Only tells the kernel where to send messages;  It does not have anything to do with login terminals as that is handled by inittab and getty.  I can use tty1 because it allows me to see the kernel messages on the LCD during boot. 


Linux hints

After reinstalled Ubuntu in my laptop, I tried to ssh laptop from Fedora computer. I got following error message:

[czhang@F13-64-VM projects]$ ssh czhang@





Someone could be eavesdropping on you right now (man-in-the-middle attack)!

It is also possible that the RSA host key has just been changed.

The fingerprint for the RSA key sent by the remote host is


Please contact your system administrator.

Add correct host key in /home/czhang/.ssh/known_hosts to get rid of this message.

Offending key in /home/czhang/.ssh/known_hosts:3

RSA host key for has changed and you have requested strict checking.

Host key verification failed.

This is because the RSA host key has changed since reinstalled the system.
Just remove the RSA key will solve the problem.

$ rm /home/czhang/.ssh/known_hosts


Ubuntu 10.04 Install No Machine NX

Download DEB package from here:

$ sudo chmod 755 /usr/lib/cups/backend/ipp
$ sudo dpkg -i nxclient_3.4.0-7_x86_64.deb


Install QWT in Fedora 14

yum install libQtGTL
yum install libQtGTL-devel
yum install gcc-c++
yum install qt-devel

1. Install Qt programm (Will be installed in /home/czhang/QtDSK)
2. Download qwt-6.0.0.tar.bz2
3. cp qwt-6.0.0.tar.bz2 /home/czhang/
4. tar -xjvf qwt-6.0.0.tar.bz2
5. qmake-qt4
6. make
7. sudo make install
8. sudo cp /home/czhang/qwt-6.0.0/designer/plugins/designer/ /home/czhang/QtSDK/QtCreator/lib/qtcreator/plugins/designer
9 cp -a /home/czhang/qwt-6.0.0/lib/* /usr/lib64  // copy all etc.
10 Add following codes in the end of .pro file in Qt, before build
LIBS += -L/usr/local/lib -lQtSvg
INCLUDEPATH += /usr/local/qwt-6.0.0/include
LIBS += -L/usr/local/qwt-6.0.0-rc5/lib -lqwt


Beginners: Learn Linux

From (

1. What is Linux?

Linux is a free Unix-type operating system for computer devices. The operating system is what makes the hardware work together with the software. The OS is the interface that allows you to do the things you want with your computer. Linux is freely available to everyone. OS X and Windows are other widely used OS.

Linux gives you a graphical interface that makes it easy to use your computer, yet it still allows those with know-how to change settings by adjusting 0 to 1.
It is only the kernel that is named Linux, the rest of the OS are GNU tools. A package with the kernel and the needed tools make up a Linux distributionMandrake , SUSE Linux,Gentoo and Redhat are some of the many variants. GNU/Linux OS can be used on a large number of boxes, including i386+ , Alpha, PowerPC and Sparc.

2. Understanding files and folders

Linux is made with one thought in mind: Everything is a file.
A blank piece of paper is called a file in the world of computers. You can use this piece of paper to write a text or make a drawing. Your text or drawing is called information. A computer file is another way of storing your information.
If you make many drawings then you will eventually want to sort them in different piles or make some other system that allows you to easily locate a given drawing. Computers use folders to sort your files in a hieratic system.
A file is an element of data storage in a file system (file systems manual page). Files are usually stored on harddrives, cdroms and other media, but may also be information stored in RAM or links to devices.
To organize our files into a system we use folders. The lowest possible folder is root / where you will find the user homes called /home/.
Behind every configurable option there is a simple human-readable text file you can hand-edit to suit your needs. These days most programs come with nice GUI (graphical user interface) like Mandrakes Control Center and Suses YAST that can smoothly guide you through most configuration. Those who choose can gain full control of their system by manually adjusting the configuration files from foo=yes to foo=no in an editor.
Almost everything you do on a computer involves one or more files stored locally or on a network.
Your filesystems lowest folder root / contains the following folders:
/binEssential user command binaries (for use by all users)
/bootStatic files of the boot loader, only used at system startup
/devDevice files, links to your hardware devices like /dev/sound, /dev/input/js0 (joystick)
/etcHost-specific system configuration
/homeUser home directories. This is where you save your personal files
/libEssential shared libraries and kernel modules
/mntMount point for a temporarily mounted filesystem like /mnt/cdrom
/optAdd-on application software packages
/usr/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.
/var/var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.
/procSystem information stored in memory mirrored as files.
The only folder a normal user needs to use is /home/you/ - this is where you will be keeping all your documents.
Files are case sensitive, "myfile" and "MyFile" are two different files.
For more details, check out:

3. Understanding users and permissions

Linux is based on the idea that everyone using a system has their own username and password.
Every file belongs to a user and a group, and has a set of given attributes (read, write and executable) for users, groups and all (everybody).
A file or folder can have permissions that only allows the user it belongs to to read and write to it, allowing the group it belongs to to read it and at the same time all other users can't even read the file.

4. Who and what is root

Linux has one special user called root (this is the user name). Root is the "system administrator" and has access to all files and folders. This special user has the right to do anything.
You should never log on as this user unless you actually need to do something that requires it!
Use su - to temporary become root and do the things you need, again: never log into your sytem as root!
Root is only for system maintenance, this is not a regular user (LindowsOS don't have any user management at all and uses root for everything, this is a very bad idea!).
You can execute a command as root with:
su -c 'command done as root'
Gentoo Linux: Note that on Gentoo Linux only users that are member of the wheel group are allowed to su to root.

5. Opening a command shell / terminal

To learn Linux, you need to learn the shell command line in a terminal emulator.
In KDE: K -> System -> Konsoll to get a command shell)
Pressing CTRL-ALT-F1 to CTRL-ALT-F6 gives you the console command shell windows, while CTRL-ALT-F7 gives you XFree86 (the graphical interface).
xterm (manual page) is the standard XFree console installed on all boxes, run it withxterm (press ALT F2 in KDE and Gnome to run commands).
Terminals you probably have installed:
Non-standard terminals should install:

6. Your first Linux commands

Now you should have managed to open a terminal shell and are ready to try your first Linux commands. Simply ask the computer to do the tasks you want it to using it's language and press the enter key (the big one with an arrow). You can add a & after the command to make it run in the background (your terminal will be available while the job is done). It can be practical to do things like moving big divx movies as a background process: cp movie.avi /pub &Jobs - the basics of job control

6.1. ls - short for list

ls lists the files in the current working folder. This is probably the first command to try out. It as a number of options described on the ls manpage.
ls -al --color=yes

6.2. pwd - print name of current/working directory

pwd prints the fully resolved name of the current (working) directory. pwd manpage.

6.3. cd - Change directory

cd stands for change (working) directory and that's what it does. The folder below you (unless you are in /, where there is no lower directory) is called "..".
To go one folder down:
cd ..
Change into the folder Documents in your current working directory:
cd Documents
Change into a folder somewhere else:
cd /pub/video
The / in front of pub means that the folder pub is located in the / (lowest folder).

7. The basic commands

7.1. chmod - Make a file executable

To make a file executable and runnable by any user:
chmod a+x myfile
Refer to the chmod manual page for more information.

7.2. df - view filesystem disk space usage

df -h
Filesystem Size  Used Avail Use% Mounted on
/dev/hda3 73G 67G 2.2G 97% /
tmpfs 2.0M 24K 2.0M 2% /mnt/.init.d
tmpfs 252M 0 252M 0% /dev/shm
The flags: -h, --human-readable Appends a size letter such as M for megabytes to each size.

7.3. du - View the space used by files and folders

Use du (Disk Usage) to view how much space files and folders occupy. Read the du manual page for flags and usage.
du is a part of fileutils.
Example du usage:
du -sh Documents/
409M Documents

7.4. mkdir - makes folders

Folders are created with the command mkdir:
mkdir folder
To make a long path, use mkdir -p :
mkdir -p /use/one/command/to/make/a/long/path/
Like most programs mkdir supports -v (verbose). Practical when used in scripts.
You can make multiple folders in bash and other shells with {folder1,folder2} :
mkdir /usr/local/src/bash/{old,new,dist,bugs}
The command rmdir removes folders.

7.5. passwd - changes your login password

To change your password in Linux, type:
The root user can change the password of any user by running passwd with the user name as argument:
passwd jonny
will change jonnys password. Running passwd without arguments as root changes the root password.
If you need to add several new users and give them password you can use a handy program like Another Password Generator to generate a large set of "random" passwords.

7.5.1. KDE

From KDE you can change your password by going:
  • K -> Settings -> Change Password
  • K -> Settings -> Control Center -> System Administration -> User Account

7.6. rm - delete files and folders, short for remove

Files are deleted with the command rm:
rm /home/you/youfile.txt
To delete folders, use rm together with -f (Do not prompt for confirmation) and -r(Recursively remove directory trees):
rm -rf /home/you/foo/
Like most programs rm supports -v (verbose).

7.7. ln - make symbolic links

A symbolic link is a "file" pointing to another file.
To make a symbolic link :
ln /original/file /new/link
This makes /original/file and /new/link the same file - edit one and the other will change. The file will not be gone until both /original/file and /new/link are deleted.
You can only do this with files. For folders, you must make a "soft" link.
To make a soft symbolic link :
ln -s /original/file /new/link
ln -s /usr/src/linux-2.4.20 /usr/src/linux
Note that -s makes an "empty" file pointing to the original file/folder. So if you delete the folder a symlink points to, you will be stuck with a dead symlink (just rm it).

7.8. tar archiving utility - tar.bz2 and tar.gz

tar (manual page) is a very handle little program to store files and folders in archives, originally made for tapestreamer backups. Tar is usually used together with gzip (manual page) or bzip2 (manual page), comprepssion programs that make your .tar archive a much smaller .tar.gz or .tar.bz2 archive.
You can use the program ark (K -> Utilities -> Ark) to handle archives in KDE. Konquerortreats file archives like normal folders, simply click on the archive to open it. The archive becomes a virtual folder that can be used to open, add or remove files just as if you were working with a normal folder.

7.8.1. tar files (.tar.gz)

To untar files:
tar xvzf file.tar.gz
To tar files:
tar cvzf file.tar.gz filedir1 filedir2 filedir2...
Note: A .tgz file is the same as a .tar.gz file. Both are also often refered to as tarballs.
The flags: z is for gzip, v is for verbose, c is for create, x is for extract, f is for file (default is to use a tape device).

7.8.2. bzip2 files (.tar.bz2)

To unpack files:
tar xjvf file.tar.bz2
To pack files:
tar cvjf file.tar.bz2 filedir1 filedir2 filedir2...
The flags: Same as above, but with j for for bzip2
You can also use bunzip2 file.tar.bz2 , will turn it into a tar.
For older versions of tar, try tar -xjvf or -xYvf or -xkvf to unpack.There's a few other options it could be, they couldn't decide which switch to use for bzip2 for a while.
How to untar an entire directory full or archives?
for i in `ls *.tar`; do tar xvf $i; done
.tar.gz: for i in `ls *.tar.gz`; do tar xvfz $i; done
.tar.bz2: for i in `ls *.tar.bz2`; do tar xvfj $i; done