How to disable / enable TeamViewer service on Linux and Windows

servicesteamviewer

This question is for purposes of disabling unnecessary running service in the background of program called TeamViewer.

Normally, the background service is running all the time.

I wish for it to be disabled from PowerShell Administrator prompt and re-enabled upon request / and similarly from Linux Terminal.

Preferrably by one simple command or defined function.

Note1: I need this both on Windows (10) and Linux (Mint 18).

Note2: I need CLI solution.

Best Answer

Linux (Terminal)

  • Enabling:

    sudo teamviewer daemon enable
    
  • Disabling:

    sudo teamviewer daemon disable
    

Your personal aliases would look exactly like that.

Just add them to your personal Bash aliases file:

~/.bash_aliases
  • Enabling:

    alias tv-enable='sudo teamviewer daemon enable'
    
  • Disabling:

    alias tv-disable='sudo teamviewer daemon disable'
    

Windows (PowerShell)

  • Enabling:

    sc.exe config "TeamViewer" start= auto
    net start TeamViewer
    
  • Disabling:

    sc.exe config "TeamViewer" start= disabled
    net stop TeamViewer
    

Your personal aliases would look exactly like that.

Just add them to your personal PoweShell profile file:

$PROFILE
  • Enabling:

    function tv-enable {
        sc.exe config "TeamViewer" start= auto
        net start TeamViewer
    }
    
  • Disabling:

    function tv-disable {
        sc.exe config "TeamViewer" start= disabled
        net stop TeamViewer
    }
    
Related Question