You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

terminal stuck

My Terminal has become unusable for the last couple of weeks, a web developer that I work with suggested that I switch to using iTerm2 as a replacement to using the regular apple terminal.


Since then I've moved from web to mobile and I am using xCode, however when the terminal opens up to run the app (or indeed just opening the terminal) the title of the window starts flicking through different titles, before eventually displaying over and ove:


-bash: /usr/bin/uname: Argument list too long

-bash: /bin/ps: Argument list too long


Using ctrl+c to cancel whatever process is that it seems to be running still leaves me unable to enter any commands.


I've, tried deleting the preferences for the Terminal, but it didn't make a difference :(


Hopefully the attached screenshots will help out (I can't attach a video of course)


Please Help...


Posted on Sep 20, 2019 5:58 AM

Reply
4 replies

Sep 20, 2019 6:26 AM in response to JamestheDevil

Quit Terminal if it is running.


In a Finder window on your Home folder

Command-Shift-Period

This will display all invisible files.


Look for these files and if you find them, rename them

.bash_profile

.bash_login

.profile

.bashrc


Hold the Option key, and go to Finder -> Go -> Library (you need the option key to see the Library entry)

Navigate down to

Library -> Preferences

Find com.apple.Terminal.plist

Drag it out of the Preferences folder


Now try to start Applications -> Utilities -> Terminal


I specified going there, vs just using Spotlight or if you have it on your Dock, or if you have an Alias, because I have seen instances where someone have made a copy of Terminal and is trying to run an old (in some cases VERY OLD) version. The Applications -> Utilities -> Terminal should be the current version.


PS. I happen to like iTerm2, but Terminal should work.


SIDE NOTE: The .bash_profile, .bash_login, .profile, .bashrc would be used by iTerm2, so you may have to put them back after you get Terminal working again, and see if it was the shell initialization scripts or if it was the preferences.

Sep 20, 2019 6:29 AM in response to BobHarris

I should mention that iTerm2 will also be using the shell initialization scripts .bash_profile, .bash_login, .profile and/or .bashrc


So when you get Terminal working again, you may have to put the .bash_profile, .bash_login, .profile and/or .bashrc back to figure out if it was one of the shell initialzation scripts or the Terminal preferences that was bad.

terminal stuck

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