The only way to send data from the Linux side to the Arduino side is through a file. Basically, you have to create a file in the Linux environment with the data you want to send. Then you have to open that file and read it from the Arduino sketch. I've written an example about it, I recommend you to check it: Galileo/DataSharing.ino at master · MakersTeam/Galileo · GitHub. I hope you find the example useful.
In the following site you will find a more detailed description about sharing data between environments. Notice that the guide is for Edison, but it can be applied for Galileo: IoT - Data sharing between programming environments on Intel® Edison | Intel® Developer Zone
I've done. Thanks for your answer, you saved my time