Introduction

Some commands and tips, often used when working on a server, I feel tired of asking gpt again and again.

1. Kill Jupyter Notebook Kernel

When you use Jupyter Notebook on a server,especially when in VSCode, sometimes the kernel may get stuck or become unresponsive. Unfortunately, VSCode does not provide a direct way to kill or shutdown the kernel from its interface.This make a lot of jupyter processes running on the server, consuming resources and causing confusion.

Check the running Jupyter processes with:

bash
1
pgrep -a -u username -f jupyter

and then kill

bash
1
kill -9 PID

And if you want to be more aggressive, the most brutal method is:

bash
1
pkill -9 -u username -f jupyter