I've used uname before, and used it on the 3DS already (it was 4.4 something).You could have also done maybe something like echo -e "#!/bin/bash\necho Hey\necho Whatever" > file.sh and that would have worked. uname is also fun to play with to get the kernel version and other information.
xerpi made a new thread for Linux on 3DS, as well as telling me how to get my own files into the filesystem. so I'll try that out. I also made a video which is linked in the thread as well.
https://gbatemp.net/threads/release-linux-for-the-3ds.407187/