User:SwifT/Complete Handbook/Starting from minimal environment

The prompt you are now looking at is all-powerful, but a bit daunting at first. If you know how the Linux command line works, this chapter will give you no further surprises and you can easily jump to the next chapter, ''Preparing the Network''.

Working command-line
At the prompt you can enter commands to the Gentoo Linux environment. Basic commands are just single words, like ls or ps. Most commands however often require additional words to be added, like cd /var or man ls. These added characters are called arguments.

More often, these arguments represent certain options to the command. For instance, the ls command (used to list the content of a directory) can take several options, like -l (for a lengthy description of each found file), -a (to include hidden files), etc.

In the next Code Listing you'll see this terminology explained. The command shown will list the content of the directory (a temporary location) showing additional information about each file found, including hidden files.

After having constructed a command, you can execute it by pressing the return key. Your shell (the command-line environment you are currently "in" which interprets commands and helps you navigate through the Linux environment) will then execute the command and show you the results.

The next section will give you a crash course in certain Linux commands that will help you explore your current minimal Gentoo environment. We won't go in much detail - there are plenty guides and books available online that will inform you about the basic Linux tools.

Navigating up and down
We have already covered how a Linux file system looks like (the hierarchical structure, remember?). To help you out we'll give you a quick overview on the most common tools you might need to navigate on your Gentoo Linux system:

Concurrent terminals
Gentoo's installation CDs allow you to use a couple of terminals simultaneously. That means you can work in one, browse the internet in another and chat on a third. To switch between terminals, type Alt+F# (with F# one of the function keys). You will notice that your current session is at F1.

You can also work in a terminal and then put your working session in the background using a powerful tool called screen. With screen you can even let other people work on your terminal while you are watching every step they perform.

Starting a screen session:

To detach a screen session, type 'Ctrl-A' followed by a 'd'.

Reattach to a screen session:

To quit a screen session, just type 'exit':

Networking utilities
Gentoo offers a few utilities on the installation CDs which you can use to surf on the Internet, download files, chat on the IRC network, etc. We will cover a few of them in this section, but you can't use them until you have configured your network (and Internet connection) which is described in the next chapter.

Surfing on the Internet
Because no documentation can be perfect and no two environments are alike, you will often search for additional information and help on the Internet. Websites such as the main Gentoo documentation repository or powerful search engines like Google are a welcome resource during your installation quest.

To browse through these sites you need a browser. Because the Gentoo installation CDs don't contain a graphical environment you need to use either a different system, a different installation medium or ... a non-graphical browser. The Gentoo installation CDs offer at least one of the following console browsers:


 * lynx, a general purpose web site browser which operates key-driven (for instance 'D' for downloading, 'G' to go to a different site, ...).
 * links2, a featureful browser with support for frames, limited JavaScript, svgalib/framebuffer, background downloading, ... which operates both menu-driven (press 'Escape' to open the menu) as key-driven.

Both browsers support proxy servers, although the first one uses the standard way (setting an HTTP_PROXY environment variable) while the second one requires you to enter the proxy server in the browser.

For lynx - ignore the export command if no proxy is needed:

For links2 - ignore the -http-proxy option if no proxy is needed:

Chatting on an IRC network
When you can't find useful information on the Internet, you can always ask your question on the #gentoo-install or #gentoo IRC channels on FreeNode. Gentoo delivers a terminal-based, yet extremely powerful chat client called irssi.

Its use is quite simple. First, connect to the IRC network. Then, join the channel(s) you want to participate in. You can use Alt+F# to switch between channels (or type in /window # if the key combination fails). To exit the application, type /quit.

Remote shell access
The Gentoo installation CD contains an SSH daemon, which is a tool to allow others to securely connect to your system so they can help you install Gentoo. This service isn't started by default, but if you want to use it you should:


 * get the Internet connection up and running
 * create a user account
 * give the root account a password
 * start the SSH daemon

If you trust the other person, you can give him your root password, but we advise you to only give limited access to the other person - they should help you identify errors and tell you how to resolve them, not fix the errors themselves. Otherwise you won't learn :)

First get the Internet connection up and running, then:

Give the 'myuser' user a password

This will give the 'root' user a (different) password.

The passwords you set here are limited to the Gentoo installation CD environment and only until you reboot. They are not used for your final Gentoo installation!