Shell Tutorials

  • By
    Determine Default App for File Type from Command Line

    One quality of life improvement any developer can make for themselves is ensuring different file types open in the app they're most proficient in. If you know me, you know I prefer accomplishing as much as possible from the command line. The duti utility...

  • By
    Set Brave as Default Browser from Command Line

    I've been a huge fan of the Brave web browser for years. They're crypto-friendly, provide native ad-blocking features, and even provide Tor integration. Whenever I set up new systems, I automate Brave as the default browser.You can use the following shell command to set...

  • By
    git Force Push

    Rebasing is a frequent task for anyone using git. We sometimes use rebasing to branch our code from the last changes or even just to drop commits from a branch.Oftentimes when trying to push after a rebase, you'll see something like the following:Commonly developers...

  • By
    Specify Node Versions with .nvmrc

    I've heavily promoted nvm, a Node.js version manager, over the years. Having a tool to manage multiple versions of a language interpreter has been so useful, especially due to the complexity of Node.js package management.One tip I like to give new developers is adding a...

  • By
    How to Flatten git Commits

    One of my least favorite tasks as a software engineer is resolving merge conflicts. A simple rebase is a frequent occurrence but the rare massive conflict is inevitable when many engineers work in a single codebase. One thing that helps me deal with large...

  • By
    Log a User Out from Command Line

    Automation is a system administrator, support agent, and tech savvy person's dream. Automating tasks via scripts remotely helps to get clients out of trouble or even the organization itself. Oftentimes big updates can require users log out. Logging a user out from command...

  • By
    Terminate Process on a Port from Command Line

    Once a week I have to deal with a zombie process or try to start a process that's already running on its designated port. In most cases I use macOS's Activity Monitor to kill the process, which is time-consuming. What if we could just...

  • By
    Set a Default Node Version with nvm

    As I've shown you in the past, nvm an excellent utility for switching between Node.js versions. Whether your host machine or CI, building and testing your apps on different Node versions is a necessity. I've recently found a few nvm commands that I found really...

  • By
    How to Upload a File via SSH and Command Line

    My preference for daily work is usually GUI applications, like Visual Studio Code for text editing and Cyberduck for remote file server management. I'm also a huge fan of automation, so I do try to learn the command line equivalents of UI functions. My...

  • By
    How to Restart a BAT file on Windows at an Interval

    I recently wrote a .bat script on Windows to mine Ethereum when I'm not using my gaming PC to frag noobs. I have a friend who also tries to mine cryptocurrencies but their machines have AMD processors; every once in a while, the processor...