Create linux shortcut for commands


Having long or medium commands we use pretty often, it comes in handy to create commands aliases in Linux.


An alias can describe a command or a section of commands.

To define an alias:

> alias short_command=”do something that makes sense in Linux”


> alias gotoroot=”cd /projects/htdocs/my_project”

However, after reboot, the alias is lost. That’s when we need to add it to out bashrc file:

>vim bash_profile

>nano .bashrc 

Name of the profile file is variable, but location will always be in root.


About admin

Just another php developer trying to give something back to the community.
This entry was posted in Linux and tagged , , , , . Bookmark the permalink.

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s