Forum Discussion

lyda-work's avatar
lyda-work
Copper Contributor
Jun 07, 2023

How to restart edge from the command line

How do you restart Edge from the command line?  I'd like to automatically restart Edge every time apt updates it.  It's pretty easy to add a hook to do that, but not sure what command to run.

 

I tried `microsoft-edge edge://restart` but that didn't work.

  • LBarrera1104's avatar
    LBarrera1104
    Copper Contributor

    lyda-work   Hi!

    you may try:

    taskkill /F /IM msedge.exe

    start msedge -restore-last-session

     

    Or using PowerShell:

    Get-Process -Name msedge | ForEach-Object { $_.Stop() }

    Start-Process msedge -RestoreTabs

    • lyda-work's avatar
      lyda-work
      Copper Contributor
      Well, on Linux that would be killall microsoft-edge; microsoft-edge. But I was hoping for a slightly better solution.

Resources