当前位置: 首页>编程语言>正文

binbash: bash not found Alpine linux安装bash

系统应该是 Alpine Linux LXD(Linux容器),那么入股在其中安装 bash shell呢

apk update
apk upgrade
apk add bash

# 安装 bash 文档
apk add bash-doc

# 安装 bash 自动命令补全
apk add bash-completion

# 使用 bash 作为 shell
bash

# 需要从主机登录到 Alpine Linux LXD 虚拟机,比如我从kubernets进去
kubectl exec -it acme-orderer-0 /bin/bash

# 需要将 root shell 更改为 bash
vi /etc/passwd
# 查找用户名和默认 shell,比如 /bin/ash
# root:x:0:0:root:/root:/bin/ash
# 然后用 /bin/bash 替换
# root:x:0:0:root:/root:/bin/bash

 

 

binbash: bash not found Alpine linux安装bash,/bin/bash: bash not found Alpine linux安装bash_Linux教程,第1张

 

binbash: bash not found Alpine linux安装bash,/bin/bash: bash not found Alpine linux安装bash_Linux系统_02,第2张

 

 

 

 

https://www.cnblogs.com/gaoyuechen/p/11944150.html


https://www.xamrdz.com/lan/5mt1967317.html

相关文章: