How to Relaunch Terminal Using a Command in macOS

macosterminalzsh

Today, to convert from Markdown to PDF using Pandoc, it was necessary to install pdflatex.

I did brew install basictex and then it was necessary to relaunch Terminal. For this, I simply quitted it and opened it again. But is it possible to relaunch it using a command, something like relaunch terminal?

Best Answer

Usually, installation instructions recommend a restart of Terminal if the installation modified some shell startup files (some probably recommend it even it would not be strictly necessary).

Alternative approaches:

  • source (e.g. . ~/.zshrc) the startup files manually,
  • run exec zsh -l to replace the current shell with a newly initialized version (replace zsh with the shell you are actually using),
  • open a new Terminal tab and close the old one