You are here

linux

Docker - Update Portainer

sudo docker stop portainer
sudo docker rm portainer

Remove the portainer-ce image using the docker UI

sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/docker/portainer:/data portainer/portainer-ce

Postfix commands

List all emails - you can list all mail of queue, using one of the following commands:

<strong>postqueue -p</strong>

Flush all emails - To delete or flush all emails from Postfix mail queue using the following command:

<strong>postsuper -d ALL </strong>

Flush deferred mails only - use the following command to delete deferred emails from the queue.

<strong>postsuper -d ALL deferred </strong>

vi editor - A quick cheat sheet

:x Exit, saving changes.
:w Save file.
:q Exit if no changes have been made.
:q! Exit and undo any changes made.

r Replace one character.
x Delete character to the right of cursor.
i Insert before cursor.
o Open a new line below current line.
dd Delete current line.

With Esc we can swap from command mode to input mode and viceversa.