Restarting the Dock, Finder or Your Whole Mac With the Terminal

You can use the Terminal to restart either the Dock, Finder or your entire Mac. This comes in handy for developers, those testing software, or those using unstable software when problems arise and you need to restart one of these services but other methods are not working.

Video Transcript
Hi. This is Gary with MacMost.com. On this episode let's look at how to restart some services on your Mac using the Terminal. Now sometimes you need to do this especially if you're a developer or you use beta software. Things like that, that could lockup either say the Dock or the Finder or your whole machine and your only way to actually get things going is to use Terminal.

Terminal allows you to start lots of services if you know the right command. So let's start by launching Terminal and in here, well, we can start off with the simplest thing which is to restart the Dock. So the Dock here at the bottom, if say that locks up, maybe some app you've got is misbehaving or something and the Dock is not responding correctly, a restart of the Dock could help.

So the command you use is called killall and then you type what you want to kill. This will basically quit the Dock which is not normally an app that you could quit. It's just always running. But you can do it with this command. Now what will happen is automatically is will restart, so watch the Dock at the bottom of the screen. You can see it goes away, there's a flash, and the Dock returns.

Now similarly you can do this with the entire Finder. So here I've got a Finder window open just so you can see that the Finder is running. If I were to do killall Finder you will see that the Finder window will go away and then the Finder reboots and you get everything back. So if you're having trouble with the Finder, if something is not working correctly, then you can use that.

Now for most users you never have to do this. I have to point that out. If you do have to do this then it probably means there's a bigger problem. So if you've done this more than a few times recently then you should probably try to get somebody to checkout your Mac and find out what's really wrong. But for a developer, like myself, it's a little more common to need to go and restart the Dock or restart the Finder when things go wrong. Especially when a regular restart is impossible.

So, of course, just doing a regular shutdown or restart will, of course, naturally restart everything including the Dock and the Finder. So that's for the typical user what you would do. But sometimes as a developer you are in the middle of doing something, working on something, and you just want to restart the Dock or the Finder. This is how you do it.

Now you can also restart your entire Mac. So let's say, that you know, you're having trouble and things are unresponsive and can't get to restart or shutdown or that's not working you can use Terminal for that as well. The command for that is pretty simple. It's shutdown and what you need to do is you can use either h for a complete shutdown or halt. Or r for a restart. Then you want to give a time which would be now. So if I were to use this it actually won't work because I'm not a superuser. What this means I need to authenticate. I need to give my password. So I start with sudo, su stands for superuser, so have the superuser do a shutdown with a r, restart, now. It's going to ask for the password. I'm going to hit Control C so I want to enter my user account password there, my user account is an admin account, so it works to be able to authenticate for a shutdown. Then that basically would shutdown your Mac and restart it as normal.

Comments: 5 Responses to “Restarting the Dock, Finder or Your Whole Mac With the Terminal”

    Merv E
    5/31/17 @ 2:59 pm

    Can this procedure be used to reset the Bluetooth icon which appears/disappears in the upper right corner of my Mac? FYI: Bluetooth never used on Mac, nor is it turned “On” in System Preferences either in main menu or the “Advanced” menu.?

    5/31/17 @ 4:22 pm

    Merv: Do you have the “Show Bluetooth in menu bar” option checked in System Preferences, Bluetooth? If not, then perhaps the icon is for something else.

    Merv E
    6/1/17 @ 9:30 am

    Yes, it is checked.

    6/1/17 @ 9:47 am

    Merv: OK then. Now you know why the Bluetooth icon is there.

    Merv
    6/1/17 @ 3:04 pm

    Thanks, but that doesn’t quite answer my concern. Have a great weekend.

Comments Closed.