Arduino IDE on Linux can't write program to Arduino M0 Pro

I am using Arduino IDE 1.8.5 on a Linux Mint operating system, and I got an Arduino M0 Pro, I installed the board from "Boards Manager", but when I try to upload the blink example, I get this error:

avrdude: ser_open(): can't open device "/dev/ttyACM0": Device or resource busy

Does anyone know how to fix this?

[Edit]
I had my USB plugged in the wrong jack before in the Arduino, it was in the "Native USB Port", I plugged in the "Programming Port", and selected the board "Arduino M0 pro (Programming Port)", now I get this error:

Error: unable to open CMSIS-DAP device 0x3eb:0x2111
Error: No Valid JTAG Interface Configured.
Error: No Valid JTAG Interface Configured.

I got it to work!!

Here is the solution: