?? getting started with linux for noobs!.txt
字號:
10. Boot loader: choose your boot loader (grub for default)
11. Network settings: choose the correct settings for your network (generally, don?t mess with anything unless you know what you?re doing)
12. Firewall: you can choose a firewall if you want to
13. Language support: choose any additional language support you want
14. Time zone: pick your time zone
15. Root password: set your root password (root is the admin, or superuser; you want it to be very secure)
16. Packages: choose which packages you want to install. For hard drives over 10 gigs, you can go ahead and choose all
packages (depending on how much disk space you plan on taking up later, note that most everything you?ll need is a package: the exception
being large media files). You will generally want to install all the packages you think you?ll ever need. Two desktop environments aren?t necessary.
Make sure you have at least one and the X window system! (if you want a GUI that is). I suggest you get all the servers too.
Note: Knoppix uses the KDE Desktop environment
17. Make sure everything is all right, and install
18. You can create a boot disk if you want
Note: Desktop environments might have a set-up once you enter them
IV What to do now
Now that you have a Linux set-up and running, there are many paths you
can head down. First, you should explore your GUI and menus. Browse
the web with Mozilla, get on IM with GAIM, play games, add/delete
users, check out OpenOffice, and anything else that might be part of
your daily use. Also, set up a few servers on your computer to play
around with, specifically SMTP (*wink*wink*), FTP (vsftp is a good
one), and either telnet or SSH (OpenSSH is a good one). The setup and
use of these are beyond the scope of this tutorial, but researching
them could prove to be very educational.
The filesystem
The Linux (and Unix) filesystem is different from the normal Windows
that you?re used to. In Windows, your hard drive is denoted ?C:\? (or
whatever). In Linux, it is called the root directory and is denoted
?/?. In the / directory, there are several default folders, including
dev (device drivers) mnt (mount) bin (binaries) usr (Unix System
Resources) home, etc, and others. I encourage you to explore around
the whole file system (see section V) and research more.
Once you are well situated, it?s time to get into the heart and power
of Linux: the console. The next session will guide you through it and
set you on the path to finding out how to do stuff for yourself. You
will (probably) want to start learning to rely less and less on the
GUI and figure out how to do everything through the console (try
launching all your programs from the console, for example).
V. The Console
The Console might look familiar to DOS if you?ve ever used it. The
prompt should look something like the following:
AvatharTri@localhost avathartri$
With the blinking _ following it. This can vary greatly as it is fully
customizable. Let?s get started with the commands.
First, let?s explore the file system. The command ls will "list" the
files in the current directory. Here?s an example:
AvatharTri@localhost avathartri$ ls
It should then display the contents of the current directory if there
are any. Almost all commands have options attached to them. For
example, using the -l option, which is short for "long" will display
more information about the files listed.
AvatharTri@localhost avathartri$ ls -l
We will get into how to find out the options for commands and what
they do later.
The second command to learn will be the cd command, or "change
directory". To use it, you type cd followed by a space and the
directory name you wish to go into. In Linux, the top directory is /
(as opposed to C:\ in Windows). Let?s get there by using this command:
AvatharTri@localhost avathartri$ cd /
AvatharTri@localhost /$
Now, we are in the top directory. Use the ls command you learned
earlier to see everything that?s here. You should see several items,
which are directories. Now, let?s go into the home directory:
AvatharTri@localhost /$ cd home
AvatharTri@localhost home$
And you can now ls and see what?s around. In Linux there are some
special symbol shortcuts for specific folders. You can use these
symbols with cd, ls, or several other commands. The symbol ~ stands
for your home folder. One period . represents the directory your
currently in. Two periods .. represent the directory immediately above
your own. Here?s an example of the commands:
AvatharTri@localhost home$ cd ~
AvatharTri@localhost avathartri$
This moved us to our user?s personal directory.
AvatharTri@localhost avathartri$ cd .
AvatharTri@localhost avathartri$ cd ..
AvatharTri@localhost home$
The cd .. moved us up to the home directory.
As you?ve probably noticed by now, the section behind the prompt
changes as you change folders, although it might not always be the
case as it?s up to the personal configuration.
You can use these symbols with the ls command also to view what is in
different folders:
AvatharTri@localhost home$ ls ~
AvatharTri@localhost home$ ls ..
And you can view what is in a folder by specifying its path:
AvatharTri@localhost home$ ls /
AvatharTri@localhost home$ ls /home
The last command we will cover as far as finding your way around the
filesystem is the cat command. The cat command will show the contents
of a file. Find a file by using the cd and ls commands and then view
its contents with the cat command.
AvatharTri@localhost home$ cd [directory]
AvatharTri@localhost [directory]$ ls
AvatharTri@localhost [directory]$ cat [filename]
Where [directory] is the directory you want to view and [filename] is
the name of the file you want to view. Omit the brackets. Now, if the
file you viewed was a text file, you should see text, but if it wasn?t,
you might just see jumbled garbage, but this is ok. If the file goes
by too fast and goes off the screen, don?t worry, we will get to how
to scroll through it later.
One of the most useful commands is the man command, which displays the
"manual" for the command you want to know more about. To learn more
about the ls command:
AvatharTri@localhost home$ man ls
And you will see the manual page for ls. It displays the syntax, a
description, options, and other useful tidbits of information. Use the
up and down arrows to scroll and press q to exit. You can view the
manual pages for any command that has one (most commands do). Try this
out with all the commands that you know so far:
AvatharTri@localhost home$ man cd
AvatharTri@localhost home$ man cat
AvatharTri@localhost home$ man man
One very crucial option to the man command is the -k option. This will
search the descriptions of manual pages for the word you specify. You
can use this to find out what command to do what you need to do. For
example, let?s say we want to use a text editor:
AvatharTri@localhost home$ man -k editor
And you should see a list of apps with a short description and the
word "editor" in the description.
With a blank prompt, you can hit tab twice for Linux to display all
the possible commands. For Linux to display all the commands beginning
with a certain letter or series of letters, type those letters and hit
tab twice.
Note: This is actually a function of BASH and not Linux, but BASH is
the default Linux shell.
Now that you know a little about moving around the filesystem and
viewing manual pages, there is one more trick that we will cover to
help you out. Remember how the man pages were scrollable as in you
could use the arrow keys to scroll up and down? That is because the
man pages use something called the less pager. We?re not going to go
into what this does exactly and how it works, but that?s definitely
something that you will want to look up. Here?s how to use the less
pager with a file:
AvatharTri@localhost home$ cat [filename] | less
That uses something called a pipe. The line is the vertical line above
enter on your keyboard. Briefly, what this does is take the output
from the cat command, and stick it in the less pager. By doing this,
you can view files that would normally run off the screen and scroll
up and down.
Some final commands to check out:
mkdir - make directories
cp - copy file
mv - move file
rm - remove file
rmdir - remove directory
grep - search a file for a keyword
pwd - display current working directory
top - display system resources usage (kill the program with control + c)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -