Terminal displays "unused-nctmsb"
apple Verified ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
When opening the macOS terminal, it displays "unused-nctmsb" instead of the name of my MacBook Pro.
Last login: Tue Feb 26 11:42:01 on ttys000
unused-nctmsb:~ kiley$
The terminal still seems to function normally. Completely quitting the terminal application does not help, but sometimes rebooting sets it back to normal for a while. Eventually, it will go back to displaying "unused-nctmsb" as the computer name.
What causes this? Should I be concerned? How can I fix it?
7 replies
Sign in or join Beachball Help to reply.
- 0
leroydouglas ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
When opening the macOS terminal, it displays "unused-nctmsb" instead of the name of my MacBook Pro.
Last login: Tue Feb 26 11:42:01 on ttys000
unused-nctmsb:~ kiley$
The terminal still seems to function normally. Completely quitting the terminal application does not help, but sometimes rebooting sets it back to normal for a while. Eventually, it will go back to displaying "unused-nctmsb" as the computer name.
What causes this? Should I be concerned? How can I fix it?
This is nothing to worry about from a security standpoint -- It may indicate networking trouble.
The text you're seeing there is the hostname for your machine, which may be set by your DNS server. The fact that you're seeing "unused-nctmsb" may mean that your DNS server thinks your current IP belongs to that machine.
You can check your hostname from the terminal by typing:
hostnameThe easiest way to set the hostname for your machine is to rely on macOS behavior of setting the hostname equal to the computer name by default.
Go to Apple Menu > System Preferences > Sharing and type your desired hostname into the Computer Name field.
Set the hostname, you may do so from the terminal, using the "hostname" command :
hostname <myhostname>As noted in man page hostname—
man hostname | more...this strategy will not survive a reboot, and you're better off using
scutil --set HostName <myhostname>https://support.apple.com/guide/mac-help/find-your-computers-name-and-network-address-mchlp1177/mac
- 0
Luis Sequeira1 ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
It looks like there is a command somewhere that is changing the shell prompt. Perhaps it is in ~/.bash_profile or some other file that may be executed automatically.
You can temporarily change the login shell in Terminal ->Preferences from the default to /bin/tcsh
and see that this goes away.
- 0
oranyelik ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
When I first opened up the Terminal preferences, the selected value for "Shell opens with:" had been "Default login shell"
When I selected Command, the default path was "/bin/bash".
I tried changing the value to /bin/tcsh and the problem changes slightly but does not go away. I am now seeing:
Last login: Tue Feb 26 15:30:50 on ttys000 [unused-nctmsb:~] kiley%For reference, my bash_profile has the following contents:
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion # aliases alias dev="cd ~/Development/" alias ndp="cd ~/Development/ndp" alias direct="cd ~/Development/ndp/direct" I don't believe I have any other files in my home directory that would be changing the shell prompt.
I am unable to pinpoint exactly when this started happening (but I'm guessing it hasn't been more than a month or two). I don't recall doing anything that I think would have caused this to start happening.
- 0
Luis Sequeira1 ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
What is the name of your computer, as seen in System Preferences->Sharing?
What is the output of the following command (while running the default shell, bash):
env | grep PS1
(if it produces no output, it means that the bash prompt is set at its default value)
- 0
oranyelik ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Strangely it has started working again. Sometimes it "fixes itself" like this but then later it will change back to "unused-nctmsb" without warning or changes (usually stays "working" for less than 24 hours). I'm concerned the issue will appear again as usual. If it does come up again, I will run the command you asked about above and share the output here. Is there anything else you suggest I try at the same time?
To answer your questions (in my current "working" state):
Name of computer from System Preferences -> Sharing: Kiley’s MacBook Pro (2)
Running the default shell, bash:
Last login: Tue Feb 26 18:50:31 on ttys000 Kileys-MBP:~ kiley$ env | grep PS1 Kileys-MBP:~ kiley$Same output even when I set my terminal preferences back to open with "Default login shell".
- 0
leroydouglas ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
When opening the macOS terminal, it displays "unused-nctmsb" instead of the name of my MacBook Pro.
Last login: Tue Feb 26 11:42:01 on ttys000
unused-nctmsb:~ kiley$
The terminal still seems to function normally. Completely quitting the terminal application does not help, but sometimes rebooting sets it back to normal for a while. Eventually, it will go back to displaying "unused-nctmsb" as the computer name.
What causes this? Should I be concerned? How can I fix it?
This is nothing to worry about from a security standpoint -- It may indicate networking trouble.
The text you're seeing there is the hostname for your machine, which may be set by your DNS server. The fact that you're seeing "unused-nctmsb" may mean that your DNS server thinks your current IP belongs to that machine.
You can check your hostname from the terminal by typing:
hostnameThe easiest way to set the hostname for your machine is to rely on macOS behavior of setting the hostname equal to the computer name by default.
Go to Apple Menu > System Preferences > Sharing and type your desired hostname into the Computer Name field.
Set the hostname, you may do so from the terminal, using the "hostname" command :
hostname <myhostname>As noted in man page hostname—
man hostname | more...this strategy will not survive a reboot, and you're better off using
scutil --set HostName <myhostname>https://support.apple.com/guide/mac-help/find-your-computers-name-and-network-address-mchlp1177/mac
- 0
oranyelik ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
With your comment I was able to finally pinpoint exactly what reproduces the issue.
The issue happens when I open a terminal window after connecting to a VPN for work. It is comforting to know this is not a security issue, and now that I understand the cause I do not need to pursue this investigation further.
Please let me know if you'd like me to run any commands while in this state to provide you with more information. For your reference, here are a couple of commands I have already run:
unused-nctmsb:usan-html-5-te kiley$ hostname unused-nctmsb.lan unused-nctmsb:usan-html-5-te kiley$ env | grep PS1 unused-nctmsb:usan-html-5-te kiley$