The following changes for alias are only maintained during the code runtime and goes off when the terminal prompt comes again.
system("alias listing='ls'");
Is there any way around to reflect the changes permanent, without editing the .bashrc or .bashrc_profile.
.bashrcor.profile. Otherwise, how should the shell know that it needs to define such an alias the next time it runs? Probably with permanently you actually mean till I close the shell, which is a different problem. – Andrea Corbellini Jan 9 at 16:09system(), "The system() function shall not return until the child process has terminated.". It will be a different shell, and the alias will be lost as soon assystem()returns. – njsg Jan 9 at 19:01