The linux command line--part Two Configuration And The Environment
2017-02-16 15:05
483 查看
Part 2 - Configuration And The Environment
11 - The Environment
printenv - Print part or all of the environment
set - Set shell options
export - Export environment to subsequently executed programs
alias - Create an alias for a command
What is stored in the environment?
envirnoment variables and shell variables
Examining The Environment
What's In A Startup File?
Modifying The Environment
Which Files Should We Modify?
Text Editors
Using A Text Editor
12. A Gentle Introduction To vi
vi
:q
:q!
Entering Insert Mode
"i" key
Saving Our Work
:w
Moving The Cursor Around
Cursor Movement Keys
Basic Editing
insert mode
command mode
Opening A Line
Deleting Text
Text Deletion Commands
Cutting, Copying, And Pasting Text
Yanking Commands
Joining Lines
J command
Search-And-Replace
Searching Within A Line
f command
eg. fa
Searching The Entire File
/ command
eg. /Log n command get the next
Global Search-And-Replace
:%s/pattern/replace/g
Editing Multiple Files
vi files1 file2 file3...
Switching Between Files
:n To switch from one file to the next
:N To move back to the previous file use
:buffers
:buffer 2
Opening Additional Files For Editing
vi foo.txt
:e foo2.txt
Copying Content From One File Into Another
yy (copy)
p (paste)
Inserting An Entire File Into Another
:r
Saving Our Work
:w
:wq
:w filename This act like "Save As....."
13 – Customizing The Prompt
Anatomy Of A Prompt
echo $PS1
PS1='[\u@\h \W]\$' 的意思就是:[当前用户的账号名称@主机名的第一个名字 工作目录的最后一层目录名]
Trying Some Alternative Prompt Designs
Adding Color
Moving The Cursor
Saving The Prompt
11 - The Environment
printenv - Print part or all of the environment
set - Set shell options
export - Export environment to subsequently executed programs
alias - Create an alias for a command
What is stored in the environment?
envirnoment variables and shell variables
Examining The Environment
What's In A Startup File?
Modifying The Environment
Which Files Should We Modify?
Text Editors
Using A Text Editor
12. A Gentle Introduction To vi
vi
:q
:q!
Entering Insert Mode
"i" key
Saving Our Work
:w
Moving The Cursor Around
Cursor Movement Keys
Basic Editing
insert mode
command mode
Opening A Line
Deleting Text
Text Deletion Commands
Cutting, Copying, And Pasting Text
Yanking Commands
Joining Lines
J command
Search-And-Replace
Searching Within A Line
f command
eg. fa
Searching The Entire File
/ command
eg. /Log n command get the next
Global Search-And-Replace
:%s/pattern/replace/g
Editing Multiple Files
vi files1 file2 file3...
Switching Between Files
:n To switch from one file to the next
:N To move back to the previous file use
:buffers
:buffer 2
Opening Additional Files For Editing
vi foo.txt
:e foo2.txt
Copying Content From One File Into Another
yy (copy)
p (paste)
Inserting An Entire File Into Another
:r
Saving Our Work
:w
:wq
:w filename This act like "Save As....."
13 – Customizing The Prompt
Anatomy Of A Prompt
echo $PS1
PS1='[\u@\h \W]\$' 的意思就是:[当前用户的账号名称@主机名的第一个名字 工作目录的最后一层目录名]
Trying Some Alternative Prompt Designs
Adding Color
Moving The Cursor
Saving The Prompt
相关文章推荐
- The linux command line--part 3 Common Tasks And Essential Tools
- Linux Command Line and Shell Scripting Bible,3rd,Part 3
- Linux Command To Find the System Configuration And Hardware Information
- Linux Command To Find the System Configuration And Hardware Information
- Command-line reference for the SharePoint Products and Technologies Configuration Wizard
- The difference between && and ; in the Linux command line
- Becoming an WPA Xpert Part 10: WPR and the Command Line
- The linux command line--part 4 Writing Shell Scripts
- Linux Command Line and Shell Scripting Bible__第11章
- linux command Line and shell script bible(笔记二_非用户变量)
- [linux and unix shell programming] and [the unix environment programming]
- linux command Line and shell script bible(笔记三)
- How to download files from the Linux command line
- linux command Line and shell script bible(笔记一_文档/文件系统)
- linux command Line and shell script bible(笔记二)
- rlwrap for Command Line History and Editing in SQL*Plus and RMAN on Linux
- linux command Line and shell script bible(笔记四)
- Download and run CSQL on Linux -Only two commands will be used to start the server
- How to easily open files and URLs from the command line
- Take screenshots from the command line in Linux