Linux Server Commands CheatSheet

A handy CheatSheet for TMUX and Docker commands you’ll use every day.

Some useful TMUX instructions

  • List all sessions

    1
    2
    
    tmux ls
    tmux list-session
    
  • Create a new session with the given name

    1
    
    tmux new -s <session-name>
    
  • Kill the specified session

    1
    
    tmux kill-session -t <session-ID>/<session-name>
    
  • Attach to the specified session

    1
    
    tmux attach -t <session-ID>/<session-name>
    
  • Switch to the specified session

    1
    
    tmux switch -t <session-ID>/<session-name>
    

Some useful Docker instructions

  • Show Docker version information

    1
    
    docker --version
    
  • Display system‑wide information (containers, images, etc.)

    1
    
    docker info
    
  • Get help for any Docker command

    1
    
    docker help
    
  • Create and start a new container from the specified image

    1
    
    docker run [image]
    
  • List currently running containers

    1
    
    docker ps
    
  • List all containers (including stopped ones)

    1
    
    docker ps -a
    
  • Start a stopped container

    1
    
    docker start <container-ID>/<container-name>
    
  • Stop a running container

    1
    
    docker stop <container-ID>/<container-name>
    
  • Restart a container

    1
    
    docker restart <container-ID>/<container-name>
    
  • Remove a stopped container

    1
    
    docker rm <container-ID>/<container-name>
    
  • Force remove running containers

    1
    
    docker rm -f <container-ID>/<container-name>
    
  • Run a command inside a running container

    1
    
    docker exec <container-ID>/<container-name> [command]
    
  • View the logs of a container

    1
    
    docker logs <container-ID>/<container-name>
    

To Be Continued…

All Rights Reserved
Built with Hugo
Theme Stack designed by Jimmy