Alas you've arrived at the one stop shopping article for beginners tutorials and for definitions of all of the crazy/scarey things you're seeing in linux as a new user. Hopefully this article can help you, but if not, please feel free to post in the forums and as questions! Knowledge is not usually gained by sitting and wondering, but by asking questions of others who possess the knowledge you want to gain. Some, if not most of the information here will come from other wiki pages internally, or externally, as well as some by the kind people from the eeeuser.com forums/wiki. This article is the child of this thread: Here
This is a brief guide, designed to help you get familiar with using a terminal. By including very detailed instructions here, they should not be necessary in the main body of the wiki. Original article derived from here by Niel.
Press Control, Alt and T at the same time. This is often written as Ctl+Alt+t
Alternatively, you can access the run command, by pressing F2, and then typing the name of a terminal:
and then press “Enter”
Type the command you want to run, along with any options, and finish by pressing “Enter” at the end of the line.
For example, to check your TCP/IP settings, you would use the command ifconfig. To do so, type:
and then press “Enter”.
You should see an output similar to:
ath0 Link encap:Ethernet HWAddr 00:15:XX:XX:XX:XX (mac address) inet addr: 192.168.1.XXX Bcast: 192.168.1.255 Mask: 255.255.255.0 UP BROADCAT RUNNING MULTICAST MTU: 1500 Metric: 1 RX packets: 33 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets 125 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 0 RX Bytes: 3402 (3.3 KiB) TX Bytes: 14208 (13.8KiB) collisions: 0 txqueuelen: 0 RX Bytes: 69453 (67.8 KiB) TX Bytes: 69453 (67.8KiB) lo Link encap:Local Loopback inet addr: 127.0.0.1 Mask: 255.0.0.0 UP LOOPBACK RUNNING MTU: 16436 Metric: 1 RX packets:607 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets 607 errors: 0 dropped: 0 overruns: 0 carrier: 0 wifi0 Link encap:Ethernet HWAddr 00:15:XX:XX:XX:XX (mac address) UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1 RX packets 88602 errors: 0 dropped: 0 overruns: 0 frame: 29523 TX packets 513 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 199 RX Bytes: 8468525 (8.0 MiB) TX Bytes: 36584 (35.7KiB) Interrupt: 10 Memory: e0460000- e0470000
When people are writing a series of commands to be performed at a terminal, they are unlikely to include the 'and now press “Enter”' parts. They are more likely to write something like:
./configure make make install
What this means is type
and then press “Enter”. When the command has executed (which may or may not print text into the terminal window, and the terminal shows a prompt again, type
and then press “Enter”.
And so on, for each command in the list.
You can either click the “X” in the top right hand corner, or else type:
and press “Enter”
nano is a console-based text editor, which loads very quickly. To use it, type nano, and the path of the file you wish to edit. (If there is no file in the specified location, nano will create one. As such, you must be accurate in what you type, otherwise you will create unnecessary blank files, rather than opening existing files.)
For the purposes of this tutorial, we will create a new text file in the /home/user directory, add a line of text, save the file, and exit nano.
First, create the new text file, named “text” in the /home/user directory:
nano will open, with a blank document. Type a line of text. Press “Enter” to start a new line.
When you have typed your line of text, you need to save your changes, by writing the file. To do this, press Ctl+O together.
If you want to change the file name, you can change it here. Then, once you are happy with the file name, or if you wish to overwrite an existing file which you have opened, press “Enter”
When you have saved your file, exit nano by pressing Ctl+X together.
When you have done this, you can open the file to check that your changes have been saved:
You should see whatever text you typed.
If you wanted to create or open a file with a space in the name, you would need to include the whole path in quotation marks. It is advisable that you do not use spaces in names.
nano "/home/user/text/name with spaces"
If you need to open a text file in nano with root privileges, preface the usual nano command with sudo:
sudo nano /home/user/text
This is necessary when editing certain restricted system files. For example, to edit the list of repositories available to apt-get / Synaptic, you would need to use sudo:
sudo nano /etc/apt/sources.list
Similarly, to edit the configuration of network interfaces on your EEE, you would need to use sudo:
sudo nano /etc/network/interfaces
As you may have noticed, the Linux file system is very different from a Windows one, and files are usually in very different places!
First things first, where are YOUR files? As suggested above, user files are stored in /home/user. If you go to the Work tab, there's a program called File Manager. To look around the file system properly, you need to get to a section called “All File Systems”, which you get to by highlighting “My Home” and pressing the backspace key (which is on the second row of keys in the top left of the keyboard, and looks a bit like a left pointed arrow ←). This expands the folders on the left, and shows a new tree of folders (sometimes known in Linux as directories).
This new tree looks like this:
All File Systems -- / |-bin |-boot |-dev |-disks |-etc |-home |-initrd |-lib |-lost+found |-media |-mnt |-opt |-proc |-root |-sbin |-srv |-sys |-tmp |-usr |-var
On Linux systems, your personal files are usually stored under the Home directory, and then in a folder with your username. On the EEE, your username is “user”, so if you click on the home directory, you'll see a folder in there called user, which is yours.
On Windows, configuration is kept in a system called the registry. On Linux, these files are stored in a directory called etc, so if you click in there, you'll find the majority of the files which configure how the system looks and feels. However, much like the Windows Registry, if you change something in here, you might break something! For this reason, most of the files here can only be edited by the Super User, a user known as Root. Again, as mentioned above, the root user can edit files from the command line, using the command sudo nano which brings up the nano editor as the super user. You can do the same thing from the file manager, by right clicking on a file and selecting Open With… which brings up a box. In here, type sudo nano and tick the box marked “Open In Console”.