当前位置:网站首页>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
边栏推荐
- 一大波開源小抄來襲
- [deep learning] semantic segmentation: paper reading: (CVPR 2022) mpvit (cnn+transformer): multipath visual transformer for dense prediction
- Why data Tiering
- 基于B/S的医院管理住院系统的研究与实现(附:源码 论文 sql文件)
- Oom happened. Do you know the reason and how to solve it?
- MapReduce工作机制
- Redis distributed lock implementation redison 15 questions
- Basic concepts of libuv
- Global and Chinese markets for small seed seeders 2022-2028: Research Report on technology, participants, trends, market size and share
- 美团二面:为什么 Redis 会有哨兵?
猜你喜欢

MapReduce instance (VI): inverted index

Summary of May training - from a Guang

Persistence practice of redis (Linux version)

Design and implementation of film and television creation forum based on b/s (attached: source code paper SQL file project deployment tutorial)

Redis cluster
![[deep learning] semantic segmentation: thesis reading (neurips 2021) maskformer: per pixel classification is not all you need](/img/84/cfcd006d445fc54ea0eda3f92e7d9d.jpg)
[deep learning] semantic segmentation: thesis reading (neurips 2021) maskformer: per pixel classification is not all you need

Take you back to spark ecosystem!

Activiti7工作流的使用

DCDC power ripple test

Mapreduce实例(八):Map端join
随机推荐
英雄联盟轮播图手动轮播
为什么大学单片机课上51+汇编,为什么不直接来STM32
Appears when importing MySQL
Day 5 of MySQL learning
Mapreduce实例(六):倒排索引
有软件负载均衡,也有硬件负载均衡,选择哪个?
Nc29 search in two-dimensional array
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 of SERS substrates 2022-2028: Research Report on technology, participants, trends, market size and share
There are software load balancing and hardware load balancing. Which one to choose?
MapReduce instance (x): chainmapreduce
Global and Chinese market of electronic tubes 2022-2028: Research Report on technology, participants, trends, market size and share
Redis之哨兵模式
MapReduce instance (IX): reduce end join
MapReduce instance (VIII): Map end join
Popularization of security knowledge - twelve moves to protect mobile phones from network attacks
Leetcode:608 tree node
运维,放过监控-也放过自己吧
Meituan Er Mian: why does redis have sentinels?
基于B/S的医院管理住院系统的研究与实现(附:源码 论文 sql文件)