--- a/src/Mayaqua/Unix.c
+++ b/src/Mayaqua/Unix.c
@@ -310,7 +310,7 @@ bool UnixIsInVmMain()
 #endif
 
 #if defined(UNIX_LINUX)
-	t = UnixExec("/bin/dmesg");
+	t = UnixExec("@TERMUX_PREFIX@/bin/dmesg");
 #elif defined(__FreeBSD__)
 	t = UnixExec("/sbin/sysctl -n kern.vm_guest");
 #endif
@@ -363,11 +363,11 @@
 		// Mac OS X
 		if (b)
 		{
-			UnixExecSilent("/usr/sbin/sysctl -w net.inet.ipsec.esp_port=4500");
+			UnixExecSilent("@TERMUX_PREFIX@/bin/sysctl -w net.inet.ipsec.esp_port=4500");
 		}
 		else
 		{
-			UnixExecSilent("/usr/sbin/sysctl -w net.inet.ipsec.esp_port=4501");
+			UnixExecSilent("@TERMUX_PREFIX@/bin/sysctl -w net.inet.ipsec.esp_port=4501");
 		}
 	}
 }
