New machine setup
Day-one installs, updates and housekeeping. 21 commands.
- Set up a package managerThe one tool you use to install everything else. Do this first.
- Install VS Code and the code commandVisual Studio Code, plus the code command so you can open any folder from the terminal.
- Install WSL (Linux on Windows)Run a real Ubuntu terminal inside Windows, so Linux commands and tools just work.
- Back up your computer to an external driveCopy everything that matters to a separate drive, so a lost, broken or stolen computer doesn't take your files with it.
- Change your computer's name (hostname)How to change your system name on macOS, Linux and Windows, so it's easy to spot on the network and in SSH.
- Find which version of a tool you haveSee a program's version and every copy of it on your PATH, which explains most "wrong version" problems.
- Fix "xcrun: error: invalid active developer path"Git and other tools stop working after a macOS update. Reinstall the Command Line Tools to fix it.
- Fix "zsh: command not found: brew"Homebrew is installed but your terminal can't find it, usually on Apple silicon Macs. Add it to your PATH.
- Free up space from package cachesPackage managers keep old downloads around. Clear them to get disk space back.
- Install a .deb fileInstall a downloaded .deb package on Ubuntu or Debian, with its dependencies.
- Install a coding fontJetBrains Mono Nerd Font, a clear coding font with the icons that fancy terminal prompts use.
- Install developer build toolsThe compilers and build tools that many other installs quietly need (C compiler, make and friends).
- Run a command as administrator (sudo on Windows)Windows 11 now has sudo. Switch it on, or open an administrator PowerShell instead.
- Search for a package to installFind the right package name before you install it, and see what it is.
- Set up your shellA nicer terminal with Zsh and Oh My Zsh on Mac and Linux, or PowerShell 7 with a profile on Windows.
- Show hidden filesSee dotfiles like .env and .gitignore in your file browser and terminal.
- Shut down or restart from the terminalRestart or switch off your machine, or a server you're logged in to, with one command.
- Update all your tools at onceUpgrade everything your package manager installed, in one go.
- Update the operating systemInstall every pending system update from the terminal, including security fixes.
- Update VS CodeGet the latest Visual Studio Code from the terminal.
- Use VS Code with WSLOpen your Linux projects in Windows VS Code, with the terminal and tools running inside Ubuntu.