For some reasons, I need a temporary interface where its configuration file will exist only on a ram drive, so it will be removed if the power goes off.
Is it possible? How?
A networking system is more than a configuration file. It's actually the sum of all the networking components used by the operating system.
So even if you change most configuration files, it probably won't affect anything until you restart the relevant service / program.
In this case, you want to be able to do a certain temporary customization, and that involves restarting the specific service with the revised configuration file. In many programs, the configuration file can be passed as a parameter, which makes this task quite easy. For others, it could be as simple as backing up the permanent configuration file, copy the new temporary one in its place, restart the service, and restore the backup.
On many linux you can create interfaces that will not be up at boot time .
Or you can create a script shell that create ip interface .