Terminal Activity

File Structure

If you open your Terminal Activity and type the following (followed by pressing the enter key):

cd /
You are placed in the top directory of your computer. If you then type:
ls -l
You see something similar to this:

filestruture

The above listing is what is known as the Sugar File Structure. Each name on the far right represents a directory, and each directory has a specific purpose. The lib directory, for example contains code libraries that the software on your system uses. For now you only need to be concerned with one directory: the home directory. This directory contains folders that have names corresponding to each user of the machine. If you log in as "adam" for example then you are logged into a directory in the "home" directory with the same name as your username ("adam" in this example).

The other important thing to know is that Sugar is mostly comprised of text files, so you can change almost every part of Sugar - how it looks and works - by just editing the appropriate text file.

To determine the IP address for your XO

Make sure you are connected to the Internet by going to the Neighborhood View and clicking the icon for an open network. Wait until the network icon stops blinking and the outline for that icon turns to a white circle.

  1. Launch the Terminal Activity.
  2. Type the following and press enter:
iwconfig
In the line next to inetaddr: , look for the IP address for your laptop, such as 192.168.0.2.

To transfer files to and from your XO laptop wirelessly

To upload the file test.py from another computer to the computer running Sugar, such as the XO laptop so that it goes into /home/olpc, type this in a computer that has SCP installed:

scp FILE_NAME USER@IP:TO_DIRECTORY 

For example:

scp test.py olpc@192.168.0.2:/home/olpc

To download the file /home/olpc/xo_test.py from the XO to a local computer, simply reverse the file names and locations like this example:

scp olpc@192.168.0.2:/home/olpc/xo_test.py ./