?18? ?7? Shell???? 7.2???? 7.2.3?????? 7.2.4 ?????? - PowerPoint PPT Presentation

Loading...

PPT – ?18? ?7? Shell???? 7.2???? 7.2.3?????? 7.2.4 ?????? PowerPoint presentation | free to download - id: 744de4-N2Y0N



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

?18? ?7? Shell???? 7.2???? 7.2.3?????? 7.2.4 ??????

Description:

18 7 Shell 7.2 7.2.3 7.2.4 ... – PowerPoint PPT presentation

Number of Views:16
Avg rating:3.0/5.0
Slides: 24
Provided by: asd103
Category:
Tags: bash | linux | shell

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: ?18? ?7? Shell???? 7.2???? 7.2.3?????? 7.2.4 ??????


1
?18??7? Shell????7.2???? 7.2.3??????7.2.4
??????
2
? ?
  • ??????????
  • ???????????
  • ???????????

3
???3????
  • Geecy???????????Tom???????????????tom_at_geecy??
    ????Tom????tom_at_geecy????????,???????MS-DOS??????
    ,??C\Dos6.22gt?

4
???3????(?)
  • ??,Tom??????????????????????????????????
  • 0206pm /usr/bin gt

5
???3???
  • Shell????????
  • ??????????,?????????
  • ???????????,?????????????
  • ???????????????????,??????????,????????????????

6
???3???(?)
  • ????????????,????????????????????????????????,????
    ?????,?????????????

7
7.2.3 ??????
  • ????????linux??,????????????shell,????shell(login
    shell)?
  • ???linux???,?????????shell??????????????shell,????
    ?shell?
  • ??shell?????,???????????????,??????(Environment
    Variable)

8
7.2.3 ??????
  • ??????env????????????????????????

9
7.2.3 ??????
  • ??set???????????????

10
7.2.3 ??????(?)
  • 1?LOGNAME??
  • ???????????????????echo??????????
  • 2?SHELL??
  • ???????????shell?????echo??????????

11
7.2.3 ??????(?)
  • 3?HOME??
  • LINUX????????????????
  • ???????,???????????????????????
  • ??????????????HOME???,???????echo???

12
7.2.3 ??????(?)
  • 4?PATH??
  • ??????????????????
  • ?????????,????????????,?????PATH??????????,???????
    ??????????????????,??????????
  • ??,?????PATH???????????????????????,??????????

13
7.2.3 ??????(?)
  • 4?PATH??(?)
  • ??????echo??????????
  • ?????PATH??????????????
  • ??????,????????????????????bin???
  • ?????????????(??chmod ux,???x????????)???????,???
    ????????????,?????????./????

14
7.2.3 ??????(?)
  • 5?SHLVL??
  • ??????????shell???(shell level)?
  • ?LINUX?,???????SHELL????SHELL,????SHELL?????SHELL,
    ?????
  • ??????????SHELL?????????
  • ??SHELL????1????????SHELL?,??????1?

15
7.2.3 ??????(?)
  • 6?PS1??
  • PS1(Prompt String 1)???????shell?????
  • \u???????
  • \h??????
  • \w????????????????????????\W?????
  • ?????????,???????,??,\?????????,?????????
  • ????PS1?????????????

16
7.2.4 ??????1?????
  • ???shell??????,?????????,?????????shell????
  • ?????,??shell????SHELL????????????,???????
  • ?????????????????shell???????????,????????(Local
    Variable)?

17
7.2.4 ??????1?????
  • 1???,??????Shell(?1?)???????COLOR,??blue?
  • 2?????????SHELL(?2?) ,????SHELL???????SHELL,??SHEL
    L?,????COLOR??????,????COLOR????????SHELL???
  • 3??????SHELL???????COLOR,??green?????????SHELL???
    ?COLOR???green
  • 4???,??????SHELL,?????SHELL,????COLOR???,???blue,?
    ??????SHELL??????

??
18
7.2.4 ??????2?????
  • ?shell???,????(Global Variable)?????????????shell?
    ?,?shell???????????
  • ?????,????????SHELL,?????SHELL?,??????????SHELL???
    ?
  • ??????export???????????????????

19
7.2.4 ??????2?????
  • 1???,??????SHELL???????COLOR,??blue,???export?????
    ?COLOR,?????????
  • 2?????????SHELL(?2?) ,????SHELL???????SHELL,??SHEL
    L?,????COLOR?????blue,????COLOR??????SHELL?
  • 3??????SHELL?????COLOR????green?????????SHELL????
    COLOR???green
  • 4???,??????SHELL,?????SHELL,????COLOR???,???blue,?
    ??????SHELL????????SHELL????????????????

20
???3??????
  • ??????,????PS1????????????????,
    \w??????????????????????,?????????
  • ???man bash?bash???,????5000??,????/PS1??????
    PS1???,??????/????,???????????PS1????

21
???3??????
  • ???????,??/PROMPTING????,????????????????
  • ?????????????
  • ??????????????,?q???

22
???3??????
  • ??man???????????

tom_at_geecy PS1"\_at_ \w gt"? 0206pm gt cd /usr/bin? 0206pm /usr/bin gt
23
? ?
  • 1?Tenny?????????,?????????/usr/bin?????
  • bin
  • ???????/usr/local/sbin?????
  • sbin
About PowerShow.com