Ever since updating my mac to OS Catalina I have noticed quite a few changes were made to the terminal.

Upon opening the terminal there is always the entry:

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.

I've noticed that when using ls, instead of listing the items within the current directory, it activated ghostscript. In a flurry of frustration I uninstalled ghostscript using the opensource script from https://gist.github.com/gwerbin/dcba755b0484423e9e45.

Now when I run ls, I get the following output:

GPL Ghostscript 9.16: Can't find initialization file gs_init.ps.

How do I repair things, so that I can get ls or at least have a new command dir that lists the directory?


If you do not want to change your shell from bash to zsh, then add this to your .bashrc file:


To edit this you can use this command:

nano ~/.bashrc 

While you are editing your .bashrc file, look for aliases or functions which redefined ls use Ghostscript.

Try which -a ls in Terminal.app to show you what ls is currently defined as, and what other ls commands are available.

  • Thanks for the which tip, I see that there is another program tagged to ls under /usr/local/bin/ls which is the alias to ghostscript. I tried looking for ~/.bashrc however was unable to find it – Tian Dec 12 '19 at 1:28
  • @tian see the edit – bmike Dec 12 '19 at 1:30
  • 2
    You can create a ~/.bashrc file if it doesn’t exist. I think bash might also use ~/.profile. You should be able to delete the /usr/local/bin/ls if Ghostscript is uninstalled. – TJ Luoma Dec 12 '19 at 1:31
  • How do I remove the alias for Ghostscript if I cannot find it in the ~/.bashrc & ~/.profile? – Tian Dec 12 '19 at 1:33
  • 1
    You don't need to remove a bash alias, you need to remove the file /usr/local/bin/ls (or rename it, if you want to keep it). So do that, at @TJLuoma said. – John Palmieri Dec 12 '19 at 6:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .