Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

distroboxでリモートコマンド的なアレをやる

dockerでもSSHでもできるリモートコマンド的なのを、distroboxでもしてみむとてするなり

実際のところ

ちょっと複雑な式を書くことも

$ distrobox enter ubuntu-25-04 -- bash -c "ping -c 2 8.8.8.8 || echo 'ping failed'"
localuser:ubuntu being added to access control list
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=3.84 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=3.85 ms

--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 3.837/3.845/3.853/0.008 ms

distroboxの特性で、前回の設定をしていればGUIも特に苦労なく起動可能

 distrobox enter ubuntu-24-04 -- xeyes