官术网_书友最值得收藏!

Checking Bash is running

If you're using a GNU/Linux system, and your system administrator hasn't changed your login shell, it's likely that Bash is starting up as soon as you log in with a TTY, in an xterm, or over SSH.

If you see a prompt that looks like one of these after you log in, it's a good sign you're in a bash session:

bash-4.4$
user@hostname:~$

If you want to check, you can enter this at the prompt:

bash$ declare -p BASH

If you get a response like this, with a path to your bash binary, you can be confident you are running bash:

declare -- BASH="/bin/bash"

If you get some other output, such as:

sh: declare: not found

Then you may be running some other kind of shell. You may be able to tell what it is by printing the value of the SHELL variable:

$ echo "$SHELL"

We'll use the bash$ prefix before commands throughout this book as a way to show commands you should enter at the Bash command line. We'll use just a $ prefix instead if the command should also work in other POSIX-compliant shells.

主站蜘蛛池模板: 前郭尔| 福建省| 灯塔市| 始兴县| 兴城市| 运城市| 青铜峡市| 洛宁县| 贺州市| 桃园市| 穆棱市| 张家界市| 阳西县| 三门峡市| 琼海市| 邵东县| 凭祥市| 大埔县| 苍梧县| 泸溪县| 娄底市| 梁山县| 青田县| 晋州市| 合川市| 蕲春县| 金坛市| 桃江县| 凉城县| 漳平市| 江津市| 阿拉善右旗| 玉山县| 中西区| 通化县| 安丘市| 新竹县| 阿拉善右旗| 神农架林区| 方山县| 广昌县|