Category Archives: Cheat sheets

Apt Cheat Sheet

Update the local package library

apt-get update

Upgrade all packages

apt-get upgrade

Upgrade ONE package

apt-get install --only-upgrade git

Install a package

apt-get install <package name>

Install a specific version

apt install <package name>=<version> # ex. apt install git=1.25.1

Remove a package

apt-get remove <package name>

Remove unused dependencies

apt-get autoremove

Search for a package

apt-cache search <package name>

Show package info

apt show <package name>

Lista all versions for a package

apt list --all-versions <package name>

My Docker Cheat Sheet

Run a new container

docker run <container id or name>

Start a stopped container

docker start <container id or name>

Stop a container

docker stop <container id or name>

Kill a container

docker kill <container id or name>

Restart a container

docker restart <container id or name>

List all running containers

docker ps

List all containers

docker ps -a

List with formatted output (here only show name and status of containers)

docker ps --format '{{.Names}} {{.Status}}'

Inspect a container

docker inspect <container id or name>

List all ports a container uses

docker container port <container id or name>

Open Bash in container (‘exit’ to close)

docker exec -it <container id or name> bash

Watch STDOUT from container (‘-f’ for continued logging)

docker logs <container id or name>

Search containers in registry (example: “MySQL” gives all available MYSQL-containers)

docker search <search word>

Pull container from registry

docker pull <name>

My default ports cheat sheet

I usually come in contact with many systems and servers that all have many different ports. Some I remember and some I don’t, so I put them here for easy access 🙂

  • DBs:
    • MySQL: 3306
    • PostgreSQL: 5432
    • MariaDB: 3306
    • Mimer SQL: 1360
    • OracleDB: 1521
    • IBM DB2: 50000
    • Pervasive SQL: 3351 (transactional)/1583 (relational)
    • SQL Server: 1433
  • Java Frameworks
    • Spring framework: 8080
    • Play! framework: 9000
  • Javascript Frameworks:
    • NextJS: 3000
    • Angular: 4200
    • Vue: 8080
  • Mule
    • HTTP Listener Configuration: 8081
  • WebMethods
    • IS: 5555
    • Diagnostics: 9999
    • MWS: 8080
  • ActiveMQ
    • AMQP: 5672
    • OpenWire: 61616
    • MQTT: 1883/8883(SSL)
    • STOMP: 61613
    • Web interface: 8161
    • WebSocket: 61614
  • IBM MQ
    • Queue Manager: 1414
    • AMQP: 5672
    • MQTT: 1883
  • Server:
    • HTTP: 80
    • HTTPS: 443
    • SSH: 22
    • FTP: 21
    • SMTP: 25 (legacy)/587
    • SMTPS: 465
  • Misc web applications
    • Webmin: 10000