在Linux中,type
命令用于显示给定命令的类型和来源
type command_name
例如,要查看ls
命令的类型,你可以输入:
type ls
这将显示类似以下的输出:
ls is /bin/ls
这表示ls
命令位于/bin/ls
。
请注意,type
命令不会显示别名。如果你想查看一个命令的完整路径,包括可能的别名,你可以使用which
或command
命令。例如:
which ls
或
command ls
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:linux关机命令如何设