1

I execute my jobs in terminal using:

mpirun -np 4 lmp_fedora < in.stdinfile

Now I want to create a permanent alias run so that I can just input the command:

run < in.stdinfile 

from any directory in the terminal to execute my jobs. What is the syntax for the alias or the environment variable?

kos
  • 41,268
Theo Score
  • 29
  • 2

1 Answers1

1

In this case the alias would be:

alias run='mpirun -np 4 lmp_fedora'

The canonical way to add an user-defined local alias is to put it into ~/.bashrc; you can directly add it to ~/.bashrc using this command, which will append it to the end of the file:

echo "alias run='mpirun -np 4 lmp_fedora'" >> ~/.bashrc

Then you can run source ~/.bashrc to apply the changes in your current bash instance:

source ~/.bashrc
kos
  • 41,268