参考:What does 'source' do?

当我们修改了/etc/profile文件,并想让它立刻生效,而不用重新登录,就可以使用source命令,如source /etc/profile。

source命令

source是一个内建命令。下面命令执行环境是Ubuntu 16.04.3 LTS下的bash。事实上source命令并不是bash(Bourne shell)内置的,他是GNU项目后来扩展引入的。其他shell不确定是否有source命令。

Linux命令——type、which、whatis、apropos、whereis、find

root@ubuntu:~# type source 
source is a shell builtin
View Code

相关文章:

  • 2021-09-13
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2021-08-25
猜你喜欢
  • 2021-09-12
  • 2021-08-04
  • 2021-09-23
  • 2022-12-23
相关资源
相似解决方案