码迷,mamicode.com
首页 > 系统相关 > 详细

Linux内置命令和外部命令

时间:2017-06-25 20:17:09      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:tin   nali   bind   bin   isp   continue   gen   搜索   http   

1、Linux的命令可以分为内部命令和外部命令:

  内置命令在系统启动时就调入内存,是常驻内存的,所以执行效率高。

  而外部命令是系统的软件功能,用户需要时才从硬盘中读入内存。

2、type -  Display information about command type

    #查看当前系统的命令是否为内置命令和外部命令。

3、BASH_BUILTINS
   alias, bg, bind, break, builtin, caller, cd, command, compgen, complete, compopt,  continue,  declare,  dirs,  disown,  echo,enable,  eval,  exec, exit, export, false, fc, fg, getopts, hash, help,history, jobs, kill, let, local, logout, mapfile, popd, printf,  pushd,pwd,  read, readonly, return, set, shift, shopt, source, suspend, test,times, trap, true, type, typeset, ulimit, umask, unalias, unset, wait

  #Linux中所有的内置命令。

4、内置命令和外部命令的总结

  在RHEL6中我们说which只能在PATH变量中搜索命令的绝对路径,内置命令是内置在bash中的,所以我们找不到命令的绝对路径,

  But,在RHEL7中好像优化了这么一个特点,内置命令在PAHT环境中能找出命令的绝对路径

 

技术分享

 

Linux内置命令和外部命令

标签:tin   nali   bind   bin   isp   continue   gen   搜索   http   

原文地址:http://www.cnblogs.com/pingzhe/p/7077685.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!