How to fix terminal pause on MacBook Pro

[Command not found: /bin/chsh]


[Could not create a new process and open a pseudo-tty.]


[Re-Titled by Moderator]

MacBook Pro 15″, macOS 13.6

Posted on Nov 10, 2023 4:18 PM

Reply

Similar questions

3 replies

Nov 10, 2023 6:09 PM in response to aingel273

aingel273 wrote:

[Command not found: /bin/chsh]

[Could not create a new process and open a pseudo-tty.]

The could not create a new process generally means you have too many processes running and the process table is full.


I have not seen this since Snow Leopard 10.6 days.


When I did experience the issue, I had to add /etc/sysctl.conf entries

kern.maxproxc=2500
kern.maxprocperuid=1500
kern.tty.ptmx_max=255

Then reboot


NOTE: these values are from 15 years ago. They may not apply to current versions of macOS, and if they are valid, the values I used 15 years ago my be wrong for your situation.


I ran into these issues because I was running an Apache web server, lots of open apps, iTerm with about 4 windows and about 25 tabs open, with about 20 of those tabs ssh’ed in remote systems.


I would occasionally get the could not create process errors.

Nov 11, 2023 6:18 PM in response to aingel273

You have either have the wrong path or the wrong command. What exactly are your trying to do? You should always provide a bit of explanation on what you are attempting since the minimal details provided can be interpreted in multiple ways.


If you are trying to access the "c" shell, then the command you issues has an extra character in it (notice only one "h"):

/bin/csh


If you are trying to access the "chsh" command, then you are using the wrong path which should be:

/usr/bin/chsh


You need to be very careful since you don't seem to know how to utilize the command line. There are no safety nets when using the command line. Do not blindly follow commands or instructions you find online since it could lead you to destroying your data and even making macOS unbootable.


If you get a "command not found" error, then that means you either typed something wrong, or you are using the wrong path for the command. When using the command line, you should know how to check the contents of various directories using very basic commands which everyone using the command line should know. I highly recommend you review a command line tutorial to learn the basics which can also you help you to be alert to trouble as well. Here is a basic command line tutorial for the Bash shell (has the "$" prompt), but most of the tutorial should be similar if you are using the newer zsh (has the "%" prompt).

https://scriptingosx.com/2017/07/first-steps-in-terminal/


You can temporarily change shells by using the following commands to switch to the Bash shell or Zsh for the current Terminal session respectively so you can follow along on the linked tutorial:

/bin/bash


/bin/zsh


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.

How to fix terminal pause on MacBook Pro

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