开发者社区 问答 正文

Linux中如何使用help命令获取bash内置命令帮助?

已解决

Linux中如何使用help命令获取bash内置命令帮助?

展开
收起
去校区学技术 2022-04-02 16:36:48 982 分享 版权
1 条回答
写回答
取消 提交回答
  • 推荐回答

    在Linux系统里有一些特殊的命令,它们就是bash程序的内置命令,例如cd、history、read等,这些命令在系统目录里不存在真实的程序文件(存在于bash程序里),对于这部分命令,查看帮助的方法就是使用help命令,例如:

    [root@oldboy ~]# help cd
    
    cd: cd [-L|-P] [dir]
        Change the shell working directory. 
        Change the current directory to DIR. The default DIR is 
        the value of the HOME shell variable.
    

    提示:如果使用man cd,那么通常是查不到帮助信息的,而是会进入bash的帮助页面。

    2022-04-02 16:59:16
    赞同 展开评论