Skip to main content
PK's Diary

Main navigation

  • Home
  • Reposts
  • Stories
  • Articles
  • Notes
  • About

Breadcrumb

  1. Home
  2. Notes

Create alias for frequently used commands

No one wants to waste time on unnecessary things, especially a developer. If you frequently use a command on your terminal/command line, I would recommend creating a command alias to save some seconds (I guess).

I would make it quick, let's assume you want to navigate to some directory from anywhere and you want to avoid typing cd .... bla bla bla bla. So, let's make the alias for this.

Open the terminal and edit the .bash_profile

sudo nano ~/.bash_profile

Add the following line in the file 

alias ms='cd ~/Sites/my_site'

Save the file, exit and restart the terminal. and try your command, for the above case it's 'ms'. And here you go, you saved some milliseconds or seconds ;)

 

 

Tags

  • Software Development
References
Further Explore: Passing parameters to the alias
  • Log in to post comments

Comments

Explore topics

TwigQED42Acquia CertificationDrupal PlanetDrupal CertificationThinkingDrupalOpen SourceLifeBackend Specialist
more tags

Quick Notes

Accessing Translated Entity in Views Twig | Drupal 8
Making a variable available (as global) in all twig files in Drupal
Data Structures and Algorithms - Solved in Javascript | Geeksforgeeks
Create alias for frequently used commands
Acquia Front-End Specialist Exam Preparation Pointers

Recent Stories around me

Software Engineer Interview Experience with Glovo
Why Amazon is better than Flipkart - Indian ecommerce market
Acquia Certified Drupal 8 Grand Master
Seminar at DCRUST on Open Source as Career
A Walk to Remember | June 2015 - August 2018 | QED42

Recent write-ups | PK's pen

How to check if Memcache, opcache or varnish is functional with the Drupal 8 application?
Getting started with ReactJS & Drupal (Fully-Decoupled)
Extending Drupal Translations for Custom Entity in Drupal 7
Google Assistant Integration with Drupal
Art of writing template files - Drupal 8
PK's Diary
Powered by Drupal