1) Open ~/.bashrc
2) Add the following line
alias start-working='sudo service apache2 start; sudo service mysql start; sublime'33
After saving the file reconfigure your bashrc
3) . ~/.bashrc
And check your new alias is loaded
4) alias
Thats it, you can start working now by running
5) start-working
Reference:
http://askubuntu.com/questions/118312/creating-custom-command
Tip:
Sometimes you are supposed to see junk characters when you are compiling
a code in putty terminal. Set the below variable
export LC_ALL="POSIX"
to avoid junk characters in compilation window
Th problem arises because of character encoding issues between console and putty terminal
To change the compilation path using custom command
/root/.bashrc
alias set-path='cd /home/Desktop/Downloads/code/linux-source-3.2/'
just using the command set-path to switch the compilation path wherever you are
No comments:
Post a Comment