A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
-bash/zsh: true: command not found # Windows (WSL2) sudo apt-get update sudo apt-get install coreutils # Debian apt-get install coreutils # Ubuntu apt-get install coreutils # Alpine apk add coreutils # Arch Linux pacman -S coreutils # Kali Linux apt-get install coreutils # CentOS yum install coreutils # Fedora dnf install coreutils # OS X brew install coreutils # Raspbian apt-get install coreutils # Dockerfile dockerfile.run/true # Docker docker run cmd.cat/true true
true 命令用于和其他命令进行逻辑运算,总返回失败,值为 1,该命令是 bash
内建命令,相关的帮助信息请查看 help 命令。
true [ignored command line arguments] true OPTION
--help display this help and exit --version output version information and exit
true 返回成功的 Exit code 0,返回成功退出状态代码 0。将此与 || 一起使用 使命令始终以 0 退出的运算符:
true