Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Docker in WSL 2

Tips and Traps

  1. Docker on WSL 2 works great. However, the performance of IO is extremely bad if it access the Windows filesystem. For more discussions, please refer to WSL 2 Filesystem .

  2. Docker containers launched from a WSL (e.g., Ubuntu) shell will continue to run after the WSL shell …

Map Keys in Linux

Note: For Vim users, it is appealing to make the Caps Lock function like Escape. It is suggested that you make Caps Lock an additonal Escape rather than swap them. This avoid inconsistent key mapping issues when you work remotely via VNC, NoMachine, etc.

Desktop Environment

Some desktop environment (e …

Compress and Decompressing Archives in Linux

Tips and Traps

  1. Always test integrity of the compressed file before you throw away the original archives. I've seen a case before that a large zip file generated in Windows cannot be unzipped correctly in Linux. Not sure what happend though.

  2. Zstd is currently the best compression/decompression tool. It …

Schedule Task Using Cron in Linux

Note: Cron is great for simple scheduling requests. For complicated scheduling with many dependencies you probably want to go with AirFlow .

Installation

Cron is usually installed by default. It not (e.g., if you are using a Docker image), you can install it using the following command (on Ubuntu).

wajig …

Change Shell in Mac

You can check the current shell in use by running the following command.

echo $SHELL

However, notice that echo $SHELL does not report the right shell sometimes. A more robust way is to use echo $0.

The default shell can be changed using thee comamnd chsh. For example, thee following …