Flush DNS Cache in Catalina

Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
I use Terminal and I type in what it recommended then was prompt with Password, which password do I put in.. My daily sign in PW or Apple PW?? when I type I dont see letters I type at all?? Any advise
 
Joined
May 21, 2012
Messages
10,753
Reaction score
1,198
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
The password used in Terminal, is your macOS user account password. Not displaying "any input", is normal for terminal.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,775
Reaction score
2,118
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Your account password and you shouldn't see anything being typed since that's the whole idea of the security, not knowing how many characters the password is.

If you enter it wrong, it will prompt again. Fail 3 times and it will just stop and you have to enter the command again.

Why do you think you need to flush the DNS cache?
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
I get Apple news letter and was advised to do this once in a while so I thought to try it. Maybe I should nt do it since I have no problem. Heres the articles:
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
Your account password and you shouldn't see anything being typed since that's the whole idea of the security, not knowing how many characters the password is.

If you enter it wrong, it will prompt again. Fail 3 times and it will just stop and you have to enter the command again.

Why do you think you need to flush the DNS cache?
Yes you re right, I know my password but failed 3 times??
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,775
Reaction score
2,118
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Yes you re right, I know my password but failed 3 times??

Are you sure? :) Whatever password you use when you login or are promoted to install applications is the one you use here.
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
Are you sure? :) Whatever password you use when you login or are promoted to install applications is the one you use here.
I use 2 different PW , one when I log in in the morning, if I install app, I use apple PW. I tried both and falied
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,775
Reaction score
2,118
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Can you tell us what command you are using, so we can see what's going on.
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
Can you tell us what command you are using, so we can see what's going on.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. I use space between letters, maybe I should nt??
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,775
Reaction score
2,118
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Space between characters in your password? Not sure what you mean.
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
Space between characters in your password? Not sure what you mean.
No, I mean space using sudo---- like below, not sure if I m supposed to
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Tried it 3 more times failed... never works for me
 
Last edited:

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Ron:

Forget using the Terminal. Just run OnyX and use its defaults. OnyX automatically flushes the DNS cache. :)
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
Ron:

Forget using the Terminal. Just run OnyX and use its defaults. OnyX automatically flushes the DNS cache. :)
Oh really, but still like to use Terminal to gain my knowledge but why do I failed. Still not sure if I should use my sign in or Apple password . I even did both and still dont work,
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Ron:

I just tried it with using the Terminal and it works okay for me. I just typed in my admin password when it asked for it. The password of course is hidden from view, but it works just the same. I don't know what you're doing wrong?

Are you sure you're using your Admin password? That would be the same password used for installing apps and making changes.
 

IWT


Joined
Jan 23, 2009
Messages
10,309
Reaction score
2,243
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
M2 Max Studio Extra, 32GB memory, 4TB, Sonoma 14.4.1 Apple 5K Retina Studio Monitor
Hi Dittoman1,

The admin password you use to log in to your Mac is the same one you use to allow an app to make changes within your Mac.

That admin password is used for all things related to the running of your Mac including Terminal.

Your Apple Password relates to strictly Apple ID matters such as iCloud, iTunes purchases, syncing apps via iCloud etc.

It should have nothing whatever to do with Terminal.

Because Terminal does not show your password when you type it - for security reasons - you shouldn’t assume that a failure is due to that. It is much more likely that the input code is incorrect. I’d check that first and stick with your admin password.

Ian
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
Hi Dittoman1,

The admin password you use to log in to your Mac is the same one you use to allow an app to make changes within your Mac.

That admin password is used for all things related to the running of your Mac including Terminal.

Your Apple Password relates to strictly Apple ID matters such as iCloud, iTunes purchases, syncing apps via iCloud etc.

It should have nothing whatever to do with Terminal.

Because Terminal does not show your password when you type it - for security reasons - you shouldn’t assume that a failure is due to that. It is much more likely that the input code is incorrect. I’d check that first and stick with your admin password.

Ian
Admin pasword is what I m confused about. I think Admin password is what you sign in when restart Mac. OS X password is like installing apps. right?? Now with Terminal I did bot and failed...
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona
Ron:

I just tried it with using the Terminal and it works okay for me. I just typed in my admin password when it asked for it. The password of course is hidden from view, but it works just the same. I don't know what you're doing wrong?

Are you sure you're using your Admin password? That would be the same password used for installing apps and making changes.
Really, **** I did exactly follow suggestion with space for every words. Did u use space? Can u use screen shot of what you type then enter but not password so I can look at it
 
OP
Dittoman1
Joined
Dec 20, 2013
Messages
617
Reaction score
15
Points
18
Location
Chalfont, PA
Your Mac's Specs
MacBook Pro M2 16GB Memory Apple M2 Chip, Somona

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,775
Reaction score
2,118
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Ron, you entered your password correctly and the commands you were executing did their job. They do NOT provide any feedback, that might be what's confusing you.

When you enter the incorrect password, you get the following:

$ sudo foo
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
sudo: 3 incorrect password attempts

I just hit ENTER each time without entering anything.

The "killall -HUP" command restarted the mDNSResponder service, you can confirm that by doing the following command
Code:
ps -eaf | grep DNSResponder

The output on my machine is:
65 268 1 0 Wed09PM ?? 0:26.55 /usr/sbin/mDNSResponder
0 272 1 0 Wed09PM ?? 0:02.01 /usr/sbin/mDNSResponderHelper

The bolded section indicates when the process started, in this case on Wednesday (8/26) at 9PM which makes sense since that's when the machine booted up after upgraded to the latest version of Catalina.

In your case, it should just have the time of when you ran the command, so something like 3:45PM
 

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