zed-industries/zed · error
unknown uname: {uname:?}
Error message
unknown uname: {uname:?} What it means
On connect, Zed runs `uname -sm` on the remote host and parse_platform takes the last line of its output (skipping shell-init noise) expecting exactly "<os> <arch>" (crates/remote/src/transport.rs:29). If that line contains no space - because uname printed an error, is missing, or something else emitted the last line - parsing bails with "unknown uname".
Source
Thrown at crates/remote/src/transport.rs:29
channel::mpsc::{Sender, UnboundedReceiver, UnboundedSender},
};
use gpui::{AppContext as _, AsyncApp, Task};
use rpc::proto::Envelope;
use util::command::Child;
pub mod docker;
#[cfg(any(test, feature = "test-support"))]
pub mod mock;
pub mod ssh;
pub mod wsl;
/// Parses the output of `uname -sm` to determine the remote platform.
/// Takes the last line to skip possible shell initialization output.
fn parse_platform(output: &str) -> Result<RemotePlatform> {
let output = output.trim();
let uname = output.rsplit_once('\n').map_or(output, |(_, last)| last);
let Some((os, arch)) = uname.split_once(" ") else {
anyhow::bail!("unknown uname: {uname:?}")
};
let os = match os {
"Darwin" => RemoteOs::MacOs,
"Linux" => RemoteOs::Linux,
_ => anyhow::bail!(
"Prebuilt remote servers are not yet available for {os:?}. See https://zed.dev/docs/remote-development"
),
};
// exclude armv5,6,7 as they are 32-bit.
let arch = if arch.starts_with("armv8")
|| arch.starts_with("armv9")
|| arch.starts_with("arm64")
|| arch.starts_with("aarch64")
{
RemoteArch::Aarch64
} else if arch.starts_with("x86") {View on GitHub (pinned to f4178619ac)
Solutions
- SSH in manually and run `uname -sm` - the last line must look like `Linux x86_64`
- Fix remote shell init files so non-interactive sessions produce no errors, and ensure `uname` resolves in the default PATH
- On Windows remotes, connect to WSL instead of the native host
Example fix
# before $ ssh user@host 'uname -sm' uname: command not found # after (fix PATH in shell init files) $ ssh user@host 'uname -sm' Linux x86_64
Defensive patterns
Strategy: validation
Validate before calling
# pre-flight the exact command Zed runs before adding the remote: ssh user@host 'uname -sm' # the last output line must be exactly two tokens, e.g. 'Linux x86_64'
Prevention
- Keep remote shell rc files quiet and error-free for non-interactive sessions
- Verify uname exists in the default non-interactive PATH on managed hosts
- Test with `ssh host 'uname -sm'` first; it must print '<os> <arch>' as the last line
When it happens
Trigger: A remote login where the last line of `uname -sm` output is a single token: "uname: not found" from a restricted PATH, an error printed by broken shell rc files, or a non-POSIX shell on the remote host.
Common situations: Minimal or container hosts without coreutils in the non-interactive PATH; broken .bashrc/.zshrc printing errors; native Windows sshd without WSL; appliances with busybox in an unusual location.
Related errors
- build ids may only contain lowercase letters, numbers, '.',
- registry dataset requires a name
- cannot open repository on disconnected remote machine
- Prebuilt remote servers are not yet available for {os:?}. Se
- Prebuilt remote servers are not yet available for {arch:?}.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/a2b0d5f1174ef8cc.
Report an issue: GitHub.