How to migrate an IDE to another PC?

gimpo:

  • the installation folder (/home/giulio/arduino-1.8.1/arduino)
  • the sketchbook folder (/home/giulio/sketchbook/)
  • the configuration folder (/home/giulio/.arduino15/)
  • .....what else?

That should be everything.

gimpo:
Arduino uses his own C/C++ compiler, right? So I will not have problems in installing it on two different Linux version, yes?

Yes, as long as you use the official Arduino IDE downloaded from http://www.arduino.cc/en/Main/Software all the tools will either be in /home/giulio/arduino-1.8.1/arduino/hardware/tools or /home/giulio/.arduino15/packages (for packages installed via Boards Manager) or /home/giulio/sketchbook/hardware (for manually installed hardware packages). If you get the version from a package manager they have modified it to use the external tools.

You might find it useful to use the Arduino IDE in portable mode, which would allow you to run everything from your USB drive:
https://www.arduino.cc/en/Guide/PortableIDE