You don't have to publish your Linux software under the GPL. You are of course welcome to do so, but you are under no legal obligation.
You've taken a mental shortcut: “using a GPL library means I have to license under GPL”. But the GPL (and copyright law in general) doesn't care about what other software you use, but only whether your software is a derivative work of the GPL-covered software. For example, a software might be derivative if it is a modification of the original software, or if it includes the original software (in whole or in part). Using a library means linking the library, and the act of linking includes parts of the library in your program.
But when you write a software that runs on Linux, you are not including or modifying any part of Linux. Your software is not a derivative work of Linux. Thus, the license of the Linux kernel doesn't affect the license of the software running on it. (In fact, there is lots of software running on Linux that's completely incompatible with the GPLv2, such as Apache-2 licensed software or proprietary software.)
(For technical reasons the Linux kernel actually does inject the vdso pseudo-library into every running process as part of Linux' implementation of syscalls. But this is widely considered to be no licensing problem.)
Also, GPL does not mean that you have to publish your software. If your software is derivative of GPL-covered code and if you publish the software then the software as whole can only be licensed under the GPL. The GPL's requirements only trigger when you give a copy of your software to someone else.