Modifikasi perintah terminal dengan ‘bash alias’

Merubah ataupun mempermudah beberapa perintah di terminal dengan menambahkan alias command ke file .bashrc. Edit file .bashrc

nano ~/.bashrc

misal kita akan menyingkat perintah <em>sudo apt-get update</em> menjadi <em>up</em>, tambahkan baris berikut ke file .bashrc

alias up='sudo apt-get update'

setelah itu reload file .bashrc

source ~/.bashrc

Hasil test perintah up.

bashrc-test

Sumber bacaan : http://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s