I am trying to create a simple alias that will allow me to create a new screen and set its name simple by typing newscreen {screenname} where {screenname} is set at the prompt.

For example, I would like to be able to create the following alias:

alias newscreen='screen -D -R -S {screenname}'

Then at the command prompt, type:

$ newscreen client

This would then start a new screen for me, and give it a name of client

That way, I could resume the screen with screen -r client.

Can someone point out to me the best way to do that.


  • Not an answer, but you may also want to check out tmux. It is more user friendly than screen IMO.
    – sbtkd85
    Commented May 6, 2014 at 16:12
  • Why not just use alias newscreen='screen -D -R -S'? Commented May 6, 2014 at 18:52

1 Answer 1


Can't you alias the first part without the screen name: alias newscreen='screen -D -R -S'

And then $ newscreen client

And further down the line screen -r client

  • The clearest answer I ever see Commented May 6, 2014 at 23:12
  • Googlers: the required switch for setting a name is simply -S, credit Commented Jul 24, 2021 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .