当前位置:网站首页>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
边栏推荐
- 工作流—activiti7环境搭建
- Mapreduce实例(九):Reduce端join
- What are the models of data modeling
- 基于B/S的网上零食销售系统的设计与实现(附:源码 论文 Sql文件)
- Lua script of redis
- [Chongqing Guangdong education] reference materials for nine lectures on the essence of Marxist Philosophy in Wuhan University
- 为什么大学单片机课上51+汇编,为什么不直接来STM32
- 五月刷题01——数组
- 一大波开源小抄来袭
- Redis' bitmap
猜你喜欢

Hero League rotation chart manual rotation

一大波開源小抄來襲

手把手教您怎么编写第一个单片机程序

Oom happened. Do you know the reason and how to solve it?

Hard core! One configuration center for 8 classes!

MapReduce工作机制

What are the models of data modeling

Counter attack of noodles: redis asked 52 questions in a series, with detailed pictures and pictures. Now the interview is stable

Popularization of security knowledge - twelve moves to protect mobile phones from network attacks

大学想要选择学习自动化专业,可以看什么书去提前了解?
随机推荐
六月刷题02——字符串
May brush question 01 - array
Mapreduce实例(六):倒排索引
What is an R-value reference and what is the difference between it and an l-value?
Global and Chinese market of cup masks 2022-2028: Research Report on technology, participants, trends, market size and share
[deep learning] semantic segmentation: paper reading: (2021-12) mask2former
Redis之发布订阅
MapReduce instance (IX): reduce end join
Design and implementation of online snack sales system based on b/s (attached: source code paper SQL file)
[Yu Yue education] reference materials of power electronics technology of Jiangxi University of science and technology
Interview shock 62: what are the precautions for group by?
Hero League rotation chart manual rotation
【深度学习】语义分割:论文阅读(NeurIPS 2021)MaskFormer: per-pixel classification is not all you need
基于WEB的网上购物系统的设计与实现(附:源码 论文 sql文件)
Global and Chinese market of electronic tubes 2022-2028: Research Report on technology, participants, trends, market size and share
Master slave replication of redis
Design and implementation of film and television creation forum based on b/s (attached: source code paper SQL file project deployment tutorial)
Global and Chinese markets for small seed seeders 2022-2028: Research Report on technology, participants, trends, market size and share
MySQL数据库优化的几种方式(笔面试必问)
Mapreduce实例(十):ChainMapReduce