请帮助我了解如何在 WSL 下的 Ubuntu 上安装 SSH 钥匙串,以便我能够配置我的设备.ssh/config来使用它。
我正在接受一些在线培训,并且我尝试像讲师(正在使用 Metatron CLI)一样使用 来设置我的配置文件Usekeychain,但它不会将其识别为有效设置:
Host*
AddKeysToAgent Yes
UseKeychain Yes
IdentityFile ~/.ssh/[his githubfile]
Run Code Online (Sandbox Code Playgroud)
但是当我尝试登录我的服务器时,它说UseKeychain is not a command。从那时起,我一直在尝试寻找如何将我的钥匙添加到我的钥匙串以及如何设置我的配置文件。
我在 Windows 和 Linux 上都是菜鸟,所以请耐心等待。
在使用了一些命令之后,rm -rf bin我的 WSL2 发行版退出了,现在当我尝试通过 Windows 终端启动它时,我得到以下信息:
Processing fstab with mount -a failed.
<3>WSL (10) ERROR: CreateProcessEntryCommon:570: execvpe /bin/bash failed 2
<3>WSL (10) ERROR: CreateProcessEntryCommon:579: Create process not expected to return
[process exited with code 1 (0x00000001)]
Run Code Online (Sandbox Code Playgroud)
我只安装了一个发行版。
Ubuntu 20.04
Windows 11 Version 10.0.22000 Build 22000
Run Code Online (Sandbox Code Playgroud)
WSL 版本:
PS C:\Users\Andreas> wsl -v
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22000.1335 …Run Code Online (Sandbox Code Playgroud) 我将在外部 SSD 上安装 Ubuntu,我有两个选择:
我想了解这两种方法之间的区别:
我知道如果我使用持久性实时安装,我可以在多台 PC 之间交换驱动器并从 BIOS 中进行选择。完全安装可以吗?
我将在 SSD 上创建两个分区,一个用于 Ubuntu,另一个用于存储。在这些选项中,其中任何一个会限制我这样做吗?
这两个选项之间还有哪些其他差异/限制?如果可能的话,我个人希望进行正常安装。
我在我的 PC 上安装了 WSL Ubuntu 20.04,并使用wsl --install. 然后我在 Microsoft Store 中阅读了 Ubuntu 的系统架构信息,它显示“arm64”。不过CPU是Intel 12900K。不应该是“amd64”吗?
我在 WSL 中使用 Windows 10 和 Ubuntu 20.04.04 LTS(来自 Microsoft Store)。
它运行具有 Web 界面的软件,我可以在这台 PC 上的 Windows 中使用 Edge 连接到 来访问此应用程序,不会出现任何问题localhost:4040。
不幸的是,同一网络中的另一台电脑无法做到这一点。
我需要配置什么才能使网络中的另一台 PC 也可以访问在 WSL 上的 Ubuntu 中运行的软件的 Web 界面?
如果我使用该软件的Windows版本,网络上的其他PC访问Web界面没有问题。然而,Windows 版本的软件不适合我。
permissions kernel networking windows-subsystem-for-linux 20.04
我正在将我的 Ubuntu 发行版从 18.04 更新到 22.04。我将 Ubuntu 18.04 实例导出wsl --export Ubuntu-18.04 <file.tar>到 tarball,并尝试找出如何有效地将我需要的文件从中提取到我的新 22.04 实例中。
我知道我可以...
tar -tvf <file.tar>使用(t:查看内容,v:详细,f:下一个参数是文件名)查看 tarball 的内容tar -xvf <file.tar>使用(x: extract)提取整个内容tar -xvf <file.tar> <filename_or_folder>但当我列出它们时,我可能有超过 1k 个文件,我认为必须有一种比列出并手动阅读所有文件更有效的方法来浏览它们。老实说,我不确定里面有什么,但我至少想移动 python 和 java 项目以及任何配置文件的相关文件。
我已经运行了以下命令,因此此时使用不同的方法可能会很困难:
upgrade command-line tar software-installation windows-subsystem-for-linux
我尝试使用命令在 WSL (Windows 10) 中运行 docker sudo service docker start,它显示:
Starting Docker: docker
Run Code Online (Sandbox Code Playgroud)
但当我跑步时sudo docker images,它告诉我:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Run Code Online (Sandbox Code Playgroud)
关于如何解决这个问题有什么想法吗?
我忘记了 WSL 中的 Ubuntu 用户密码,但我可以通过以下方式重置它:
wsl -u root,然后(在 Ubuntu 中),passwd my_username我无需提供旧密码即可更改密码。它确实有效,但这不是安全漏洞吗?我实际上是 Linux/Unix 新手,所以我想到了这个问题......
我在尝试让 WSL 工作时遇到这些错误。
<3>WSL (9) ERROR: CreateProcessEntryCommon:574: execvpe /bin/bash failed 2
<3>WSL (9) ERROR: CreateProcessEntryCommon:583: Create process not expected to return
Run Code Online (Sandbox Code Playgroud)
我曾尝试编辑我的 Windows 终端,因为它坏了,而且我可能删除了一些文件,因为重新安装并不能解决问题。
有什么解决办法吗?
额外细节:
wsl -l -v:
NAME STATE VERSION
* Ubuntu Stopped 2
Run Code Online (Sandbox Code Playgroud)
wsl --version:
WSL version: 1.1.3.0
Kernel version: 5.15.90.1
WSLg version: 1.0.49
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2604
Run Code Online (Sandbox Code Playgroud)
wsl ~ -u root -e /usr/bin/sh结果是#符号 和闪烁_。
windows-subsystem-for-linux ×8
20.04 ×2
lubuntu ×2
bash ×1
command-line ×1
docker ×1
grub2 ×1
kernel ×1
networking ×1
openssh ×1
partitioning ×1
permissions ×1
persistence ×1
root ×1
security ×1
server ×1
ssd ×1
ssh ×1
ssh-agent ×1
tar ×1
upgrade ×1
username ×1
virtualbox ×1
windows-10 ×1