-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
区分系统
uname -a
uname -s 判断系统内核Darwin/Linu查看系统得发行版本
source /etc/os-releaseyum 他需要实现加入repository,然后才能install
关于source命令:
source filename
实在当前得bash环境下读取并执行文件中得命令
通常可用'.'来代替
如:source /etc/profile 与 . /etc/profile是等效的。
注意:source命令与shell scripts的区别是,
source在当前bash环境下执行命令,而scripts是启动一个子shell来执行命令。这样如果把设置环境变量(或alias等等)的命令写进scripts中,就只会影响子shell,无法改变当前的BASH,所以通过文件(命令列)设置环境变量时,要用source 命令。
参考链接
https://www.cnblogs.com/hurner/archive/2012/08/16/2643269.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels