Terminal Not Working

Hi,

Every time I open my terminal I get this message and it does not allow me to use it:


  • login: illegal option -- -
  • usage: login [-pq] [-h hostname] [username]
  •        login -f [-lpq] [-h hostname] [username [prog [arg ...]]]

Is there any way to solve this problem?

Posted on May 15, 2019 12:48 PM

Reply
Question marked as Top-ranking reply

Posted on May 15, 2019 1:15 PM

Create a new admin user, log into that, launch Terminal.app, cd over to your problematic /Users/{problem-user} directory, and look around for the errors in the shell login files.


Failing that, close all Terminal.app sessions, navigate to /Users/{problem-user}/Library/Preferences and find and delete the com.apple.Terminal.plist preferences file.



3 replies
Question marked as Top-ranking reply

May 15, 2019 1:15 PM in response to Emilio_Hernández

Create a new admin user, log into that, launch Terminal.app, cd over to your problematic /Users/{problem-user} directory, and look around for the errors in the shell login files.


Failing that, close all Terminal.app sessions, navigate to /Users/{problem-user}/Library/Preferences and find and delete the com.apple.Terminal.plist preferences file.



May 15, 2019 1:45 PM in response to Emilio_Hernández

If removing the com.apple.Terminal.plist does not work, then

  • Open a Finder window to your Home Folder
  • Command-Shift-period
    • This will show all the "hidden" files
  • Look for any of the following files:
    • .bash_profile
    • .bash_login
    • .profile
    • .bashrc
  • If you have any of these files (you may not), then use the Finder to rename them to something else.
  • Quit Terminal.
  • Relaunch Terminal.
  • Command-Shift-period will again hide all these files that are suppose to be hidden.

May 15, 2019 1:17 PM in response to Emilio_Hernández

If you are using the latest version of Mac OS X you can just call apple support: https://getsupport.apple.com

If you use the beta version of Mac OS X just go to the report app that you get when installing the beta version.

Remember if you use the beta version apple support number won't help you I tried.


This error looks like your account is illegal to there is an error with it.. Why don't you check that your account information is correct? Please tell me what apple support told you if you call :)


Hope I helped you!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal Not Working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.