当前位置:网站首页>永久设置source的方法
永久设置source的方法
2022-07-27 08:29:00 【龙之幻】
永久设置source的方法:
方法一:直接在终端使用 gedit 或 vi 编译 .bashrc 文件。
(1)终端打开配置文件(以gedit为例)。
gedit ~/.bashrc
(2)在文件末尾处手动添加环境并保存。以添加如下内容为例:
source ~/ceshi/devel/setup.bash

(3)使配置生效。
source ~/.bashrc
方法二:直接在文件管理的主目录中打开 .bashrc 文件。
(1)用快捷键 Ctrl + H 显示隐藏文件,找到并打开 .bashrc 文件。
(2)按照方法一的第(2)步和第(3)步完成环境配置。
方法三:使用 echo 的重定向。
(1)echo “想要的内容” >> 文件名(将想要的内容追加到文件后,对文件之前的内容不修改,只进行增添,也叫追加重定向。)
#配置环境
echo "source ~/demo02_ws/devel/setup.bash" >> ~/.bashrc
#使配置生效
source ~/.bashrc
边栏推荐
- Realize SPU management in the background
- OSI seven layer model and tcp/ip four layer (TCP and UDP) (notes)
- 1176 questions of Olympiad in informatics -- who ranked K in the exam
- I drew a Gu ailing with characters!
- Solve the problem of slow batch insertion of MySQL JDBC data
- Solution to the program design of the sequence structure of one book (Chapter 1)
- 1178 questions of Olympiad in informatics -- ranking of grades
- List delete collection elements
- Background order management
- Background image related applications - full, adaptive
猜你喜欢
Development of three database general SQL code based on PG Oracle and MySQL

First experience of tryme in opengauss

DEMO:ST05 找文本ID 信息

Have a good laugh

Interviewer: what is scaffolding? Why do you need scaffolding? What are the commonly used scaffolds?

百人参与,openGauss开源社区这群人都在讨论什么?

"Intermediate and advanced test questions": what is the implementation principle of mvcc?

"PHP Basics" uses echo statements to output information

如何在qsim查看软件对象的实例?

What is the real HTAP? (1) Background article
随机推荐
arguments
After installing mysql, docker entered the container and found that he could not log in to MySQL
Realization of specification management and specification option management functions
Apache SSI remote command execution vulnerability
[netding cup 2020 rosefinch group]nmap 1 two solutions
阿里云国际版回执消息简介与配置流程
The response of the database interface is very slow
Stored procedure trial 2 -- establish a test table to test different types of stored procedures
QPushButton 按钮的创建与简单应用
List删除集合元素
2022/7/26 exam summary
1178 questions of Olympiad in informatics -- ranking of grades
Minio 安装与使用
Realize SPU management in the background
"Basic knowledge of PHP" implement mathematical operations in PHP
Explain cache consistency and memory barrier
Day3 -- flag state holding, exception handling and request hook
idea远程调试
Solution to the program design of the sequence structure of one book (Chapter 1)
I can't figure out why MySQL uses b+ trees for indexing?