当前位置:网站首页>Function description of shell command parser
Function description of shell command parser
2022-07-06 09:41:00 【StevenXander】
1. shell What is it?
shell It's just an application , We can use the keyboard 、 Serial port sends commands to it , After entering the car, it will execute these commands .
With “ls -l” Command as an example ,
① Receive keyboard data and echo
such as : We use the keyboard to shell The program sends letters l, When it is received, it will be displayed on the screen
② Parse the input string , Find program , Execution procedure :
When we use the keyboard to shell When the program sends a carriage return , It knows that character input is over
a. shell Can parse strings , These strings are divided into several parts with spaces
The first 1 Part is the program name 、 Command name ,
Other parts are parameters
b. shell Will look for the program , Where to find ? Go to PATH Find the location indicated by the environment variable .
Of course, you can also specify absolute 、 Relative paths ,shell You will go directly to these paths to find the program
c. Find the program , Will start the program , And pass in parameters
2. How to set PATH
In the PATH Add /home/book For example, catalog :
2.1 Permanent setting method 1, This works for all users :
modify /etc/environment, such as :sudo gedit /etc/environment , Then add the downlink red envelope :
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/xue"
Then restart the system or log in again .
2.2 Permanent setting method 2, Valid only for the current user :
modify ~/.bashrc, Add or modify... At the end of the line :
export PATH=$PATH:/home/xue
Then restart the system or log in again .
2.3 Temporary settings :
Execute the following command at the terminal , This is only valid for the current terminal :
export PATH=$PATH:/home/xue
边栏推荐
- Publish and subscribe to redis
- Kratos ares microservice framework (I)
- Leetcode:608 tree node
- In order to get an offer, "I believe that hard work will make great achievements
- 【深度学习】语义分割:论文阅读:(2021-12)Mask2Former
- Popularization of security knowledge - twelve moves to protect mobile phones from network attacks
- Redis cluster
- DCDC power ripple test
- Detailed explanation of cookies and sessions
- Take you back to spark ecosystem!
猜你喜欢
MapReduce instance (VII): single table join
发生OOM了,你知道是什么原因吗,又该怎么解决呢?
Sentinel mode of redis
O & M, let go of monitoring - let go of yourself
Design and implementation of online shopping system based on Web (attached: source code paper SQL file)
Servlet learning diary 8 - servlet life cycle and thread safety
Solve the problem of too many small files
基于WEB的网上购物系统的设计与实现(附:源码 论文 sql文件)
MapReduce instance (VIII): Map end join
Lua script of redis
随机推荐
Redis' bitmap
Redis connection redis service command
[Yu Yue education] Wuhan University of science and technology securities investment reference
Solve the problem of too many small files
May brush question 02 - string
Basic concepts of libuv
YARN组织架构
一文读懂,DDD落地数据库设计实战
Sqlmap installation tutorial and problem explanation under Windows Environment -- "sqlmap installation | CSDN creation punch in"
软件负载均衡和硬件负载均衡的选择
Nc29 search in two-dimensional array
五月集训总结——来自阿光
Global and Chinese markets for small seed seeders 2022-2028: Research Report on technology, participants, trends, market size and share
[deep learning] semantic segmentation: paper reading: (CVPR 2022) mpvit (cnn+transformer): multipath visual transformer for dense prediction
大学想要选择学习自动化专业,可以看什么书去提前了解?
为什么大学单片机课上51+汇编,为什么不直接来STM32
Redis分布式锁实现Redisson 15问
018.有效的回文
CAP理论
Mapreduce实例(八):Map端join