Did your MEGAsync desktop application become unresponsive and won't close or reboot?

On Ubuntu, you can force quit the MEGAsync application by using the pkill command in your terminal.

If you don't already have a terminal window open, you can open one with the CTRL+ALT+T keyboard shortcut.

Then, execute this command in your terminal to kill all processes running MEGAsync on your machine:

    
      sudo pkill -9 mega
    
  

This command runs the pkill command with the -9 option, which is the SIGTERM signals used to tell a process to terminate.

After successfully running that command, all the instances of MEGAsync running on your machine should now be closed and terminated.

If you don't want to kill all the MEGAsync processes running on your machine, you can also kill individual processes. To do this, you need to first list out all the PIDs (Process Identifiers) running MEGAsync and then use the sudo kill -9 PID command to kill a specific process using its PID.

You can list all the processes running MEGAsync with this command:

    
      ps aux | grep mega
    
  

The command uses ps aux to get all the processes running on your machine and then grep mega to filter out everything but processes running MEGAsync.

This will output something that looks like the following:

    
      nick      7007  1.0  0.4 856164 64520 ?        Sl   15:18   0:00 megasync ...
    
  

The first number you see in the output after the username (7007 in the example output above) is the PID for that specific process.

You can also modify the output to only show the PID numbers:

    
      ps aux | grep mega | awk '{ print $2 }'
    
  

This output will look like this:

    
      7007
      18936
    
  

Now that you have the PID/s for the process running MEGAsync, you can end it with this command:

    
      sudo kill -9 PID
    
  

That will kill only the specific PID number you give to the command.

Thanks for reading!