Getting Started with Linux

Source: Internet
Author: User
Tags julian day

Linux the Getting Started

#1. Linux Understand

? The core prototype of Linux was written by Torvalds (Linus Torvalds) in 1991;

? Linux is the operating system of open source.

#2. Shell the Understanding

? Shell commonly known as shell (used to distinguish from the kernel), refers to the "user Interface" software (Command parser)

-Graphical interface Shell:gnome,kde ...

-command-line Shell:bash,csh,ksh ..... (Linux uses bash)

#3. GNOME Common Quick Actions

? ctrl+alt+ | down//Switch work interface

? Ctrl+alt+l//Lock screen

? ALT + F1//Open main Menu application

? ALT + F10//Maximize the current Window Gnome Common shortcut operation

? PrtSc//Capture fullscreen

? CTRL+SHIFT+PRTSC//Interception of selected screens

? ALT + Tab//Toggle Window

? ALT + F4//Close window

#4. command line prompt

[Email protected] desktop]$

Kiosk//user who opened the shell

@//Delimiter

Foundation0//The short name of the host, indicating that the shell is open in that host

Desktop//Indicates where you are in the system

$//For ordinary users in the identity prompt, the super user prompt is: #

#5. Virtual Console

The most useful time for a virtual console is to switch to another Virtual console when a program fails to lock the input

CTRL+ALT+F2~F6//Enter Virtual Console

ctrl+alt+f1| F7//Back to graphics

#6. Simple command operation :date,passwd,cal,file,head,tail,wc,history Summary command usage rules

1). How do I use commands in the shell?

1. Commands must be entered after the prompt

2. Input mode of command: Command parameter target

Parameters are specified for the command function:

-parameter//abbreviation for Word date

--full spelling of parameters//words

2). How do I get command help?

? Comm--help

? Mans Comm

? pinfo Comm

? /usr/share/doc

3). Read the Help information:

? [content]//Content Selection Plus

? < content >//content must be added

? Content ...//any number of content

4). simple command operation: Switch User date ls cal passwd

To switch users :

Su-l Student

Su-l root (root can be omitted, note the password when switching superuser)

Date:

Usage: date [options] ... [+ format]

Or: Date [-u|--utc|--universal] [MMDDHHMM[[CC]YY][.SS]]

-Displays the current time, the time format is hours: minutes: seconds;

-Display the current time, the time format is year-month-day hour: minutes: seconds;

-Modify the current time to a specified time

  

  ls (displays files and directories in the current directory):

Usage: LS [option] ... [File] ...

-A//list all

-L//list file attributes

-S//list file size

-r//Recursive list

-d//Specify the directory itself

   

Cal (Show Calendar):

Usage: LS [option] ... [File] ...

-1,--one only displays the current month (default)

-3,--three show last month, month and next month

-S,--sunday Sunday as the first day of the week

-M,--monday Monday for the first day of the week

-j,--julian output Julian Day

-Y,--year output all year

-Show Current date

-Show today is the day of the year

-Show a month of any year

passwd (Operation of user password):

Usage: passwd [Options ...] < account name >

-K, keep authentication tokens out of date

-D, delete the password for the named account

-L LOCK the password for the named account

-U, unlock the password for the named account

-E, terminate the password for the named account

-F, enforcing actions

-X, the maximum effective time period for the password

-N, minimum effective time limit for passwords

-W, warning period

-I, non-active period

-S, Report password status

-Unlock specified user password

-View specified user password status

-Change the password, (when the password is invalid, because it is the superuser is working, so re-input can be modified successfully) (if the user other than the super user to modify their own or other user password failed, can switch to the root user)

5). Simple command operation: file head tail WC less cat

File:

Usage: file [Options ...] [File ...]

-View File types

Head:

Usage: head [options] ... [File] ...

-C,--bytes=k display the first K bytes

-N,--lines=k display the first K rows of data

Example: Displaying the first three lines of a file

-Q, does not display the header containing the given file name

-V, always displays the header of the file containing the given file name

  

Tail:

Usage: tail [options] ... [File] ...

-Two lines after displaying the file

WC:

Usage: WC [option] ... [File] ...

Or: WC [options] ...--files0-from=f

-C,--bytes output byte count

-M,--chars output character count

-L,--lines output New line number

The--files0-from= file reads from the specified file with a nul-terminated name if the file is

Specify as "-" to read the file name from the standard input

-L, shows the length of the longest line

-Displays the number of file bytes

less(a tool for paging through files or other output):

common ways to use

(1). Search
When you open a file using the command less file-name, you can search for it in the file using the following method. The matching portions of the entire text are highlighted when searching.

1.1 Forward Search

/: Search with a pattern and navigate to the next matching text

N: Find the next matching text forward

N: Find the previous matched text backwards
1.2 Backward Search

? : Searches using a pattern and navigates to the previous matching text

N: Find the next matching text backwards

N: Forward search for previous matched text

(2). Full Screen navigation

CTRL + F: Move one screen forward

CTRL + B: Move backward one screen

CTRL + D: Move forward half screen

CTRL + U: Move back half screen

(3). single-line navigation

J: Move Down one line

K: Move up one line

(4). Other navigation

G: Move to the last line

G: Move to the first line

Press space: Turn down one page

B: Turn up one page

D: Turn down half a page

U: Turn up half page

Q/zz: Exit less command

(5). Edit File

V: Enter edit mode to edit the current file using the configured editor

(6). Tag Navigation

When you use less to view large files, you can mark them in any location, and you can navigate to the text location labeled with a specific tag by command.

MA: Use A to mark the current position of the text

' A: Navigate to mark A

(7). Browse Multiple Files

Mode one, passing multiple parameters to less, you can browse multiple files.

Less file1file2

Mode two, when you are browsing a file, use: E to open another file.

Less file1

: E file2

When you open multiple files, use the following command to switch between multiple files

: N-Browse next file

: P-Browse Previous file

(8). Less version Tail-f

In Linux dynamic View log files commonly used commands are not tail-f, in fact less can also do this work, using the F command.

Using less file-name to open the log file, execute command F, you can achieve a similar tail-f effect.

Cat:

Usage: cat[options] ... [File] ...

Output the [file] or standard input combination to the standard output.

-A,--show-all equals-vet

-B,--Number-nonblank to non-null output line number

-E equals-ve

-E,--show-ends Show "$" at the end of each line

-N,--number of all lines for the output

-S,--squeeze-blank does not output multiple lines of blank lines

-T vs.-VT equivalence

-T,--show-tabs to display the ^i character as a

-U (ignored)

-V,--show-nonprinting uses ^ and M-references, except LFD and TAB

-Show file contents

-Display the contents of the file (output line number, difference between-B and-n whether the empty output line number)

6). History Command Invocation

! Number//execution how many commands

The keyword//executes the most recent command that starts with a keyword

ctrl+r+ keyword//Bring up the most recent command with a keyword

Up/down key//view forward or backward from the last command

history//View History

History-c//Clear History

7). command line common shortcut keys

CTRL + A//cursor moves to the beginning of the line

CTRL + E//cursor moves to end of line

CTRL + U//cursor position deleted to beginning of line

CTRL + k//cursor Location Delete to end of line

CTRL + r//to bring up the most recent command with a keyword

Ctrl + Left | Right//MOVE cursor in Word unit

CTRL + c//undo the command you have entered

CTRL + d//Close the current environment

CTRL +shift + t//new open table in existing shell

CTRL +shift + pageup|pagedown//lock screen

CTRL +alt + l//Toggle Table

Getting Started with Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.