Chris Tyler - Fedora Linux

Здесь есть возможность читать онлайн «Chris Tyler - Fedora Linux» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Год выпуска: 2006, ISBN: 2006, Издательство: O'Reilly, Жанр: ОС и Сети, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Fedora Linux: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Fedora Linux»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

"Neither a "Starting Linux" book nor a dry reference manual, this book has a lot to offer to those coming to Fedora from other operating systems or distros." -- Behdad Esfahbod, Fedora developer This book will get you up to speed quickly on Fedora Linux, a securely-designed Linux distribution that includes a massive selection of free software packages. Fedora is hardened out-of-the-box, it's easy to install, and extensively customizable - and this book shows you how to make Fedora work for you.
Fedora Linux: A Complete Guide to Red Hat's Community Distribution In this book, you'll learn how to:
 Install Fedora and perform basic administrative tasks
 Configure the KDE and GNOME desktops
 Get power management working on your notebook computer and hop on a wired or wireless network
 Find, install, and update any of the thousands of packages available for Fedora
 Perform backups, increase reliability with RAID, and manage your disks with logical volumes
 Set up a server with file sharing, DNS, DHCP, email, a Web server, and more
 Work with Fedora's security features including SELinux, PAM, and Access Control Lists (ACLs)
Whether you are running the stable version of Fedora Core or bleeding-edge Rawhide releases, this book has something for every level of user. The modular, lab-based approach not only shows you how things work - but also explains why--and provides you with the answers you need to get up and running with Fedora Linux.

Fedora Linux — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Fedora Linux», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

SSH_AUTH_SOCK=/tmp/ssh-dNhrfX2621/agent.2621

TERM=xterm

UID=503

USER=hank

USERNAME=hank

WINDOWID=58721388

XAUTHORITY=/home/hank/.Xauthority

_=

qt_prefix=/usr/lib/qt-3.3

Many of these variables contain settings for particular programs. Some of the common variables used by many programs are shown in Table 4-16.

Table 4-16. Key environment variables

Name Purpose Format
DISPLAY Information on which X display is being used hostname : display . screen hostname is the hostname or IP address of the X server or blank for the local host, display is the display number, and screen is the screen number (optional; the screen number specifies the monitor in a multimonitor, single-person display configuration).
HOME Home directory Absolute pathname of the user's home directory.
HOSTNAME Name of this computer Fully qualified domain name of the local host.
MAIL Location of the user's default mailbox Absolute pathname of the user's mailbox (usually /var/spool/mail/ ).
PATH List of directories to be searched to find a command Absolute pathnames of directories to be searched, separated by colons.
PS1, PS2 Primary and secondary shell prompts Plain text. Special characters sequences consisting of \ and a letter are replaced with other information; for example, \w is replaced by the current working directory (see the manpage for bash for a complete list).
TERM Model number of the current terminal Must correspond to a filename in /usr/share/terminfo/?/* .

To set a shell variable, type the variable name, an equal sign, and the value you wish to assign (all values are treated as text):

$ A= red

Once a variable has been assigned a value, you can use it in commands, preceded by a dollar sign:

$ ls -l red

ls: red: No such file or directory

$ touch $A

$ ls -l red

-rw-r--r-- 1 hank hank 0 Jul 18 15:26 red

The echo command can be used to view the value of a variable:

$ echo $A

red

To destroy a variable, use the unset command:

$ echo $A

red

$ unset A

$ echo $A

$

Finally, to make a variable accessible to processes started by the current process, use the export command:

$ unset A

$ TEST=blue

$ echo $TEST # variable is known to the shell

blue

$ bash # start a child shell

[hank@beige foo]$ echo $TEST # variable is not known to child

[hank@beige foo]$ exit # exit back to parent shell

exit

$ export TEST # export the variable

$ echo $TEST # value is still known to the shell

blue

$ bash # start a new child shell

[hank@beige foo]$ echo $TEST # exported value is known to the child

blue

The PATH value is stored in an environment variable of the same name. Its value can be viewed like any other environment variable:

$ echo $PATH

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin

To add a directory to the existing directories, use $PATH on the righthand side of an assignment to insert the current value of the variable into the new value:

$ PATH=$PATH: /home/hank/bin

$ echo $PATH

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/hank/bin

You don't need to export PATH in this case because it has already been exported; assigning a new value does not changes its exported status.

Assuming that the topten script is saved in /home/hank/bin , you can now execute it by just typing its name:

$ topten

-rw-r--r-- 1 root root 807103 Jul 12 21:18 termcap

-rw-r--r-- 1 root root 499861 Jul 17 08:08 prelink.cache

-rw-r--r-- 1 root root 362031 Feb 23 08:09 services

-rw-r--r-- 1 root root 97966 Jul 15 11:19 ld.so.cache

-rw-r--r-- 1 root root 92794 Jul 12 12:46 Muttrc

-rw-r--r-- 1 root root 83607 Mar 23 07:23 readahead.files

-rw-r--r-- 1 root root 73946 Jul 13 02:23 sensors.conf

-rw-r--r-- 1 root root 45083 Jul 12 18:33 php.ini

-rw-r--r-- 1 root root 30460 Jul 13 20:36 jwhois.conf

-rw-r--r-- 1 root root 26137 Mar 23 07:23 readahead.early.files

Within a script, you can prompt the user using the echo command, and then use the read command to read a line from the user and place it in an environment variable:

echo "Please enter your name:"

read NAME

echo "Hello $NAME!"

Or you can collect the standard output of a command and assign it to a variable using the $( ) symbols:

$ NOW=$(date)

$ echo $NOW

Tue Jul 18 22:25:48 EDT 2006

4.12.1.2. Special variables

There are several special parameters , or special variables , that bash sets automatically; Table 4-17 contains a list of the most important ones.

Table 4-17. Important special variables

Name Description Notes
$$ Process ID of the shell Since process IDs are unique (at any one point in time), this can be used to ensure unique filenames (e.g., /tmp/$$.txt will never conflict with the same filename used by another copy of the same script).
$0 Name of the script Useful to generate error messages, and when one script is invoked through more than one name.
$1, $2, $3, ... Arguments given on the script's command line The shift command will eliminate $1 and then shift all of the parameters accordingly ($2 becomes $1, $3 becomes $2, and so forth).
$# Number of arguments from the script's command line If $# is 0, then no options were given on the command line.
$* $@ All of the arguments from the script's command line When quoted, "$*" becomes a single block of text containing all of the arguments, while "$@" becomes separate words. If the script is called with the arguments "green" and "yellow", then "$*" would evaluate to "green yellow", while "$@" would evaluate to "green" "yellow".
$? Exit status of the last command Manpages document the possible exit-status values for most commands.

4.12.1.3. Control structures

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Fedora Linux»

Представляем Вашему вниманию похожие книги на «Fedora Linux» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Fedora Linux»

Обсуждение, отзывы о книге «Fedora Linux» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x