Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Working Remotely in Linux

From Linux to Linux:

  • Command Line Mode: ssh

    • Using X forwarding, you can also run GUI applications on the server. This is not recommended unless it's short quick work.
  • Remote File System: sshfs

    • You'd better use a mount point which you have full access to, otherwise, you have use the …

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 …