All you need is to add the commands in ~/.bashrc Configuration file.
I have taken the example of printing some message but you can almost write any command and make it run.
- Open Terminal. Applications>Accessories>Terminal
- Type gedit ~/.bashrc in terminal. You can use any editor you want. I am using gedit over here. You can also make changes inside terminal only if you are comfortable with vi editor.
- Just write the commands you want to run!! for example:
echo "THIS IS MY FIRST POST ON THIS BLOG"
This is how it will look. Notice that the command ran as soon as terminal was started. So you can write all kind of commands and make them run.
Tip: you can also run shell scripts. And do all sort of crazy things..:P
Note: Commands requiring root privileges won't run directly. They will ask for password once.
No comments:
Post a Comment