- Status/Start/Restart
systemctl {status, start, stop, restart} docker.service
- Cleanup cache
docker system prune -a
- Config
sudo vim /etc/default/docker
- docker0 interface
ifconfig | grep docker0
(docker0
is Docker's bridge network)- Only if firewalls are installed
- First: check for all services:
sudo systemctl list-units --type=service
- If firewall found, then:
sudo firewall-cmd --list-all-zones | grep -E "^[a-z]|interfaces:"
- First: check for all services:
Last active
June 17, 2025 10:17
-
-
Save prerakmody/2c1a341489d75eef13898c3e7f3a19e3 to your computer and use it in GitHub Desktop.
Docker + WSL (Windows Subsystem for Linux) Commands
-
Ports
lsof -i :<port>
ss -tulnp | grep <port>
netstat -tulnp | grep <port>
-
Firewall: iptables , ufw, firewall-cmd
- First: check for all services:
sudo systemctl list-units --type=service
sudo ufw {status, enable, disable, reload}
sudo systemctl status iptables
-->sudo iptables -L -v
sudo firewall-cmd --list-all
- First: check for all services:
-
Commands
- Check installed distros:
wsl -l -v
- Set default wsl version for distros (prior to installing):
wsl --set-default-version 2
- Install Ubuntu 22.04:
wsl --install -d Ubuntu-24.04
- Select a specific distro:
wsl -d <DistributionName>
- Delete a specific distro:
wsl --unregister <DistributionName>
- Check installed distros:
-
Docker commands
- Sample python docker:
docker pull python:3.11
docker run -it --network=host python:3.11 bash
- Sample python docker:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment