Terminal and shell
PATH, variables, scripts and scheduled jobs. 14 commands.
- Add a folder to your PATHMake the programs in a folder runnable from anywhere, for good, not just in this terminal.
- Set an environment variable for goodSave a variable like an API URL or a token so every new terminal has it.
- Fix "command not found" right after installing somethingYour terminal hasn't picked up the new program yet. Reload it, or check the program's folder is on your PATH.
- Check memory and CPU useSee which programs are using the most processor and memory, from the terminal.
- Create a command shortcut (alias)Type a short word instead of a long command you use all the time.
- Fix "app can't be opened" on a MacmacOS blocks apps downloaded from outside the App Store. Let one you trust through.
- Fix "running scripts is disabled on this system"PowerShell blocks scripts by default. Allow your own and signed scripts for your user only.
- List and kill a process by nameFind a program that is stuck or still running in the background, then stop it by its name.
- List and remove environment variablesSee every environment variable, check one and remove one you no longer want.
- Pretty-print a JSON fileTurn a squashed, hard-to-read JSON file into neat indented lines you can actually read.
- Run a script you downloadedFix "permission denied" and "running scripts is disabled" when a script won't start.
- Save terminal output to a fileSend a command's output into a file instead of (or as well as) the screen.
- Schedule a job with cronMake a command run by itself on a schedule, like every night at 2 am.
- Watch a log file liveSee new lines appear in a log file as they're written, to catch a problem as it happens.