This is mostly for myself, but I make it publicly available in case it’s useful to a single other person.
Using Zsh, it’s easier to make it so the cd command searches a group of directories. Add to the ~/.zshrc config file:
Zsh is a great Unix terminal, and Oh My Zsh makes it look pretty!
See the Linux Terminal Customization Guide for Beginners.
How to Change the Colors of Directories and Files in the ls Command
How to Configure SSH Key-Based Authentication on a Linux Server
Additional references:
First, create a file ~/.ssh/config:
Add your remote hosts to your config file.
If I would normally type
Then now I can just type
Tab completion for git should work by default in Linux/Unix. For Windows, see my post on Stack Overflow.
git_aliases | andreevWork on GitHub
github - Pushing to a different git repo | Stack Overflow
This sequence of commands is useful when you want to update your working branch to have changes merged in main. Depending on the changes in the working branch and main, it is likely there will be conflicts when running the rebase command.
Sometimes changes need to be reset on just one file to a previous commit in the git history. To do this, use the -- argument for the git command that switches to file names, as shown here.
Git Cherry Pick | Atlassian Git Tutorial
The Powershell equivalent of the linux grep command is select-string. It doesn’t work identical to grep, so it’s best to learn the command directly from the docs and not to alias grep.
Using Out-String -Stream ensures that the pipe output is interpreted correctly by the Select-String program.
It’s important to be familiar with at least one common command-line text editor, whether it be Vim, Nano, or Emacs.
Need help choosing which editor is best for you? Consider the tradeoffs here.
My personal favorite is Vim because it’s almost always installed by default and very powerful. It’s complicated, though, so it’s always good to have the Vim Cheat Sheet bookmarked for reference.
How to: Linux / UNIX create soft link with ln command
Creating hard and soft links using PowerShell | Stack Overflow
Screen is a Linux terminal program that continues to run even after disconnecting. You can have multiple windows and go between them.
For example, if running a long Jupyter notebook, run it within screen and it will continue to run, even if your terminal session ends.
Reference guides:
Then, we run:
We can select the version we want with:
Consider using uv instead, which is both easier and faster!
For Anaconda, also consider using Mamba, a fast, robust, and cross-platform Anaconda alternative. For Mamba, replace conda with mamba in the commands below.
For instructions on how to create an environment.yml file, see the Anaconda docs.
How can I convert a character to a integer in Python, and viceversa? | Stack Overflow
No posts

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.