If you use a boring o large command frequently, and you use it in any directory, you can use alias to simplificate this process. For example:
To use jupyter in a especific environment:
source activate py3k ; jupyter notebook --port=8888 --ip=178.181.4.1
Now we can create an alias with a command line:
alias jnpy3="source activate py3k; jupyter notebook --port=8888 --ip=178.181.4.1"
Then you only can call jnpy3
jnpy3
Check you alias is working and put this line in ~ / .bash_aliase (if the file does not exist, create it !!) so that when you open a new terminal this line will be executed. Your file would look like this:
#!/bin/bash alias jnpy3="source activate py3k; jupyter notebook --port=8888 --ip=178.181.4.1"
No hay comentarios:
Publicar un comentario