terminal help

Joined
May 13, 2013
Messages
10
Reaction score
0
Points
1
hi all,

new apple user for about a year.

recently logged into terminal to delete the recycle bin and saw this:

ancrsmedistrtr-2:~ (username)$

I've never seen this before, how do i delete it or reset it?
(the reset command doesn't work).
where did it come from? i'm sure it used to say 'mynotebook' before.

thanks to all.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
If you go to System Preferences > Sharing > Computer Name, what do you see?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Do you have a file in your user directory called .bashrc or .bash_profile? You'll have to show hidden files or use ls with the -a switch (so, ls -a ~) to see if you have them.

If you do, what are the contents of those files?
 
OP
M
Joined
May 13, 2013
Messages
10
Reaction score
0
Points
1
sorry, i'm lost on how to do that.

i click on my device, then HD....then click on users, then my name (house icon), here i have desktop, documents, etc. is this where you mean?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,762
Reaction score
2,100
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
You type Vansmith's command in the Terminal not in Finder..
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
did that.....

i see .bash_history
And what's in it? It's very possible that someone/something has modified what is called the PS1 environment variable.

If you want to open it, simply execute the following: open ~/.bash_profile.
 
OP
M
Joined
May 13, 2013
Messages
10
Reaction score
0
Points
1
thanks for your help.

open ~/.bash_profile.

system says
The file /Users/(user)/.bash_profile does not exist.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,762
Reaction score
2,100
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
When you did the "ls -a ~", is ".bash_history" the one file you saw or were there others? If there were others, list them all here..
 
OP
M
Joined
May 13, 2013
Messages
10
Reaction score
0
Points
1
. .cups Documents
.. .dropbox Downloads
.CFUserTextEncoding .filezilla Dropbox
.DS_Store .fontconfig Library
.Trash .local Movies
.Xauthority .spumux Music
.bash_history Applications Pictures
.config Desktop Public
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Whoops, I read your last post as saying you saw a .bash_profile when it was actually .bash_history. :)

There's nothing there that would have modified your bash prompt in any way. Are you using ATT in Alaska by any chance? It looks like ancrsmedistrtr-2 is part of some DNS server that serves ATT customers in Alaska.
 
OP
M
Joined
May 13, 2013
Messages
10
Reaction score
0
Points
1
not using att in alaska, in the uk.

so back to square one, need to find out what changed it and how to change back.:[

thanks for help.
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Want a tip?

If you don't know Terminal keep well out of it. Very powerful magic there.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Want a tip?

If you don't know Terminal keep well out of it. Very powerful magic there.

That was the tip. ;)

not using att in alaska, in the uk.

so back to square one, need to find out what changed it and how to change back.:[

thanks for help.
Have you ever used a VPN service? As I mentioned, that machine name is also part of an address for an American DNS server.

Regardless, try the following command:
Code:
sudo scutil --set ComputerName <name you want>
Replace <name you want> with what you want your computer to be called (and consequently, what will be displayed at the command prompt). You'll be prompted for your password once you hit enter - type it in and press enter again (note - you won't see the characters registered but I guarantee that they are).
 
OP
M
Joined
May 13, 2013
Messages
10
Reaction score
0
Points
1
thanks for the info mate, glad to see some users are helpful.

i entered

sudo scutil --set ComputerName macbookair

entered password

restarted mac, same again - didn't work.
never used vpn connections.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top