我有一个二进制代码,我想运行它。
01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100
Run Code Online (Sandbox Code Playgroud)
如何创建文件“application/x-executable”并在 Debian 上执行?
我正在 CentOS 7.9 GNU/Linux 系统上工作。我已经在 下构建并安装了较新版本的 git(2.34.1,而不是与发行版捆绑在一起的 1.8.3.1)/opt/git/2.34.1,并在 ; 处有指向该目录的符号链接/opt/git/current。我已将该符号链接目录添加到我的变量(的开头)$PATH。
不幸的是,当我尝试使用 HTTPS URL 签出存储库时,出现一些错误
$ git clone https://github.com/eyalroz/cuda-api-wrappers.git
Cloning into 'cuda-api-wrappers'...
git: 'remote-https' is not a git command. See 'git --help'.
Run Code Online (Sandbox Code Playgroud)
使用旧版本的 git 克隆 - 有效。
为什么会发生这种情况?我可以采取什么措施来解决它?
我想创建一个脚本,能够在任何 Linux 发行版中安装我想要的一组软件包(最初创建它以在 Ubuntu 中运行,然后将其扩展到任何一个),并且基本上充当环境设置。此类软件包的示例有zsh、omz、fzf、自动完成等...
我的问题是,我是否应该依赖软件包管理器 ( apt-get) 的存在来安装软件包,然后通过脚本或手动调用wget它源文件并继续安装?您认为哪个最好?
ubuntu shell-script software-installation package-management source-code
我跑了
git clone https://git.savannah.gnu.org/git/bash.git
cd bash/
./configure
make
./bash
Run Code Online (Sandbox Code Playgroud)
我注意到新启动的 Bash 实例没有从父 shell 继承环境,特别是定义 shell 提示符的 PS1 变量。继承适用于/bin/bash
源文件列表/bin/bash与和相同./bash
./bash -lixc exit 2>&1 | sed -n 's/^+* \(source\|\.\) //p'
/bin/bash -lixc exit 2>&1 | sed -n 's/^+* \(source\|\.\) //p'
Run Code Online (Sandbox Code Playgroud)
编辑:正如aviro提到的,PS1是在没有导出的情况下定义的,所以当我尝试导出它时它被继承了,所以我最初的问题是错误的。在我的机器上 PS1 在两个文件中定义
/etc/bash/bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
PS1='[\u@\h \W]\$ '
Run Code Online (Sandbox Code Playgroud)
和/etc/bash/bashrc.d/artix.bashrc
if ${use_color} ; then
if [[ …Run Code Online (Sandbox Code Playgroud) source-code ×4
bash ×1
binary ×1
centos ×1
executable ×1
git ×1
github ×1
shell-script ×1
ubuntu ×1