Christopher Negus - Linux Bible

Здесь есть возможность читать онлайн «Christopher Negus - Linux Bible» — ознакомительный отрывок электронной книги совершенно бесплатно, а после прочтения отрывка купить полную версию. В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: unrecognised, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

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

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

The industry favorite Linux guide
Linux Bible, 10th Edition This useful guide assumes a base of little or no Linux knowledge, and takes you step by step through what you need to know to get the job done.
Get Linux up and running quickly Master basic operations and tackle more advanced tasks Get up to date on the recent changes to Linux server system management Bring Linux to the cloud using Openstack and Cloudforms Simplified Linux administration through the Cockpit Web Interface Automated Linux Deployment with Ansible Learn to navigate Linux with Amazon (AWS), Google (GCE), and Microsofr Azure Cloud services 
 is the one resource you need, and provides the hands-on training that gets you on track in a flash.

Linux Bible — читать онлайн ознакомительный отрывок

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

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

Интервал:

Закладка:

Сделать

nedit : This is an excellent programmer's editor. You need to install the optional nedit package to get this editor.

If you use sshto log in to other Linux computers on your network, you can use any available text editor to edit files. If you use ssh -Xto connect to the remote system, a GUI-based editor pops up on your local screen. When no GUI is available, you need a text editor that runs in the shell, such as vi, jed, or joe.

Starting with vi

Most often, you start vito open a particular file. For example, to open a file called /tmp/test, enter the following command:

$ vi /tmp/test

If this is a new file, you should see something similar to the following:

□ ~ ~ ~ ~ ~ "/tmp/test" [New File]

A blinking box at the top represents where your cursor is located. The bottom line keeps you informed about what is going on with your editing (here, you just opened a new file). In between, there are tildes ( ~) as filler because there is no text in the file yet. Now here's the intimidating part: There are no hints, menus, or icons to tell you what to do. To make it worse, you can't just start typing. If you do, the computer is likely to beep at you. (And some people complain that Linux isn't friendly.)

First, you need to know the two main operating modes: command and input. The vieditor always starts in command mode. Before you can add or change text in the file, you have to type a command (one or two letters, sometimes preceded by an optional number) to tell viwhat you want to do. Case is important, so use uppercase and lowercase exactly as shown in the examples!

NOTE

On Red Hat Enterprise Linux, Fedora, and other Linux distributions, for regular users the vicommand is aliased to run vim. If you type alias vi, you should see alias vi='vim'. The first obvious difference between viand vimis that any known text file type, such as HTML, C code, or a common configuration file, appears in color. The colors indicate the structure of the file. Other features of vimthat are not in viinclude features such as visual highlighting and split-screen mode. By default, the root user doesn't have vialiased to vim. If vimis not on your system, try installing the vim-enhanced package.

Adding text

To get into input mode, type an input command letter. To begin, type any of the following letters. When you are finished inputting text, press the Esc key (sometimes twice) to return to command mode. Remember the Esc key!

a: The add command. With this command, you can input text that starts to the right of the cursor.

A: The add at end command. With this command, you can input text starting at the end of the current line.

i: The insert command. With this command, you can input text that starts to the left of the cursor.

I: The insert at beginning command. With this command, you can input text that starts at the beginning of the current line.

o: The open below command. This command opens a line below the current line and puts you in insert mode.

O: The open above command. This command opens a line above the current line and puts you in insert mode.

TIP

When you are in insert mode, -- INSERT --appears at the bottom of the screen.

Type a few words, and press Enter. Repeat that a few times until you have a few lines of text. When you're finished typing, press Esc to return to command mode. Now that you have a file with some text in it, try moving around in your text with the keys or letters described in the next section.

TIP

Remember the Esc key! It always places you back into command mode. Remember that sometimes you must press Esc twice. For example, if you type a colon ( :) to go into exmode, you must press Esc twice to return to command mode.

Moving around in the text

To move around in the text, you can use the up, down, right, and left arrows. However, many of the keys for moving around are right under your fingertips when they are in typing position:

Arrow keys: Move the cursor up, down, left, or right in the file one character at a time. To move left and right, you can also use Backspace and the spacebar, respectively. If you prefer to keep your fingers on the keyboard, move the cursor with h (left), l (right), j (down), or k (up).

w: Moves the cursor to the beginning of the next word (delimited by spaces, tabs, or punctuation).

W: Moves the cursor to the beginning of the next word (delimited by spaces or tabs).

b: Moves the cursor to the beginning of the previous word (delimited by spaces, tabs, or punctuation).

B: Moves the cursor to the beginning of the previous word (delimited by spaces or tabs).

0 (zero): Moves the cursor to the beginning of the current line.

$: Moves the cursor to the end of the current line.

H: Moves the cursor to the upper-left corner of the screen (first line on the screen).

M: Moves the cursor to the first character of the middle line on the screen.

L: Moves the cursor to the lower-left corner of the screen (last line on the screen).

Deleting, copying, and changing text

The only other editing that you need to know is how to delete, copy, or change text. The x, d, y, and ccommands can be used to delete and change text. These can be used along with movement keys (arrows, PgUp, PgDn, letters, and special keys) and numbers to indicate exactly what you are deleting, copying, or changing. Consider the following examples:

x: Deletes the character under the cursor.

X: Deletes the character directly before the cursor.

d : Deletes some text.

c : Changes some text.

y : Yanks (copies) some text.

The after each letter in the preceding list identifies the place where you can use a movement command to choose what you are deleting, changing, or yanking. For example:

dw: Deletes (d) a word (w) after the current cursor position.

db: Deletes (d) a word (b) before the current cursor position.

dd: Deletes (d) the entire current line (d).

c$: Changes (c) the characters (actually erases them) from the current character to the end of the current line ($) and goes into input mode.

c0: Changes (c) (again, erases) characters from the previous character to the beginning of the current line (0) and goes into input mode.

cl: Erases (c) the current letter (l) and goes into input mode.

cc: Erases (c) the line (c) and goes into input mode.

yy: Copies (y) the current line (y) into the buffer.

y): Copies (y) the current sentence ( ) ), to the right of the cursor, into the buffer.

y}: Copies (y) the current paragraph ( } ), to the right of the cursor, into the buffer.

Any of the commands just shown can be further modified using numbers, as you can see in the following examples:

3dd: Deletes (d) three (3) lines (d), beginning at the current line.

3dw: Deletes (d) the next three (3) words (w).

5cl: Changes (c) the next five (5) letters (l) (that is, removes the letters and enters input mode).

12j: Moves down (j) 12 lines (12).

5cw: Erases (c) the next five (5) words (w) and goes into input mode.

4y): Copies (y) the next four (4) sentences ( ) ).

Pasting (putting) text

After text has been copied to the buffer (by deleting, changing, or yanking it), you can place that text back in your file using the letter por P. With both commands, the text most recently stored in the buffer is put into the file in different ways.

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

Интервал:

Закладка:

Сделать

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

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


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

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

x