-2

I have seen many people working in linux. Creating a terminal screen which have shortcuts to other terminal screens with a definite path(destination directory.Can anybody give aclue about hpow to create it? I searched a lot about it.

To be more clear

For Ex.

  1. I have one terminal screen with options : a.) p1 b.) p2 c.) p3

p1 , p2 , p3 points to a different terminal with a fixed destination directory.

Prannoy Mittal
  • 1,525
  • 5
  • 21
  • 32

1 Answers1

0

It depends on what exactly you mean by 'shortcut'. For example, I have several shell scripts that format my command line interface for particular tasks then take me to the folder where I do those tasks and then clear the screen. If you are new to Linux I'd recommend looking into shell scripting at some point either way.

However, another way to do this is by 'aliasing', as below. Say I have to access a directory that's pretty long fairly frequently:

cd /home/Charles/JavaStuff/2014/Fall/Homework/CS101/Projects/

I can create an alias for this command or any command like so:

alias projects="cd /home/Charles/JavaStuff/2014/Fall/Homework/CS101/Projects/"

and from then on instead of typing that whole thing out I can simply type

projects

And press enter, and it will enter that whole long thing for me. If I decide I'd like the alias to be destroyed I can simply remove it by

unalias projects

Unfortunately these only last until you log out, unless of course you add it to your .bashrc file.

Charles B.
  • 193
  • 1
  • 7