If there is a pk2cmd in your distro's repository, use it instead of following this manual.
If there is no pk2cmd in your repositories but you are using Debian, Ubuntu, or any derivative, you can use urriellu.net repository.
If you can't find any other way to install pk2cmd, follow this tutorial.
Microchip DOES NOT provice amd64 binaries for Linux or any other operating system. You'll have to download pk2cmd sources and compile them. It's very easy!
Once you have downloaded the binaries or compiled them yourself, you can run pk2cmd from the directory it's placed in.
If you want to be able to run pk2cmd from anywhere without installing it (it's not recommended to install programs without using your package manager), you can store it somewhere save and run it from a script.
Create the following file, change MyPath as necessary and save it as /usr/local/bin/pk2cmd":
#!/bin/sh MyPath="/home/my_user/path_to_pk2cmd_files/" MyOldPath=$PWD cd $MyPath ./pk2cmd $* cd $MyOldPath
Remember to give it executable permissions (chmod +x /usr/local/bin/pk2cmd).
$> ./pk2cmd -P Auto-Detect: Found part PIC16Fxxx. Operation Succeeded
...then everything works fine. Go to next section.
If you read...
$> ./pk2cmd -P No PICkit 2 found.
...then you didn't plug your PICkit2 to your computer or you don't have the right permissions.
After reboot, in case you still can use pk2cmd only as root but not as a normal user, setuid it. This is not a good practise but you might want to do it in case nothing else works:
$> cd /path/to/pk2cmd $> su [root password...] $> chown root pk2cmd $> chmod u+s pk2cmd
Now you should be able to run pk2cmd as user, but it will be executed with root permissions, so it should work.