If I want to develop software on an iPad, how to start a terminal like linux and save the source local?
Without jailbreaking you can't really. iOS is designed not to allow executables to be created or even files to be moved between apps. Also there is no terminal.
If you want to build apps for iOS you generally use code on a mac.