Skip to content

Instantly share code, notes, and snippets.

@yjhjerry
yjhjerry / docker-for-mac.md
Created April 20, 2022 08:19 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@yjhjerry
yjhjerry / gist:998794643a074459e971c5b4c43f58f4
Created October 25, 2018 15:08
Display Linux user last login & system use or all user
last username
last
@yjhjerry
yjhjerry / gist:ed3236194d6b70b5a9a92f191cbdb58d
Created October 25, 2018 14:42
Check ports an application used
lsof -Pan -p PID -i