diff --git a/library/std/src/sys/env_consts.rs b/library/std/src/sys/env_consts.rs
index 018d7954db26a..9683fd47cf96b 100644
--- a/library/std/src/sys/env_consts.rs
+++ b/library/std/src/sys/env_consts.rs
@@ -389,6 +389,17 @@ pub mod os {
     pub const EXE_EXTENSION: &str = "exe";
 }
 
+#[cfg(target_os = "zkvm")]
+pub mod os {
+    pub const FAMILY: &str = "";
+    pub const OS: &str = "";
+    pub const DLL_PREFIX: &str = "";
+    pub const DLL_SUFFIX: &str = ".elf";
+    pub const DLL_EXTENSION: &str = "elf";
+    pub const EXE_SUFFIX: &str = ".elf";
+    pub const EXE_EXTENSION: &str = "elf";
+}
+
 // The fallback when none of the other gates match.
 #[else]
 pub mod os {
diff --git a/library/std/src/sys/pal/zkvm/env.rs b/library/std/src/sys/pal/zkvm/env.rs
deleted file mode 100644
index b85153642b1c9..0000000000000
--- a/library/std/src/sys/pal/zkvm/env.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-pub mod os {
-    pub const FAMILY: &str = "";
-    pub const OS: &str = "";
-    pub const DLL_PREFIX: &str = "";
-    pub const DLL_SUFFIX: &str = ".elf";
-    pub const DLL_EXTENSION: &str = "elf";
-    pub const EXE_SUFFIX: &str = ".elf";
-    pub const EXE_EXTENSION: &str = "elf";
-}