Terminal displays "unused-nctmsb"

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?

MacBook Pro 15”, macOS 10.14

Posted on Feb 26, 2019 2:53 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 26, 2019 10:15 AM

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:

 hostname


The 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


6 replies
Question marked as Top-ranking reply

Feb 26, 2019 10:15 AM in response to oranyelik

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:

 hostname


The 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


Feb 26, 2019 6:37 AM in response to Luis Sequeira1

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.


Mar 1, 2019 12:11 AM in response to leroydouglas

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$ 

Feb 26, 2019 9:56 AM in response to Luis Sequeira1

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".

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 displays "unused-nctmsb"

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