1

I have this command :

$ anbox session-manager --single-window --window-size=400,650

and i need to run it frequently, is there any way to avoid rewriting it every time I need it ?

4 Answers4

2

You can set an alias like this,

alias sessmgr = "anbox session-manager --single-window --window-size=400,650"

Later, you can directly use sessmgr.

Musthafa
  • 542
  • 1
  • 9
  • 25
2

For permanently use

  1. run this

    echo 'alias customcommand="anbox session-manager --single-window --window-size=400,650"' >> /home/$(USER)/.bashrc
    
  2. open new terminal

  3. now you can run customcommand and get that response

Benjamin W.
  • 46,058
  • 19
  • 106
  • 116
ehsan ahmadi
  • 365
  • 2
  • 13
2

You can use the alias command, and if you want to make the change permanent you can append the alias command in your .bashrc file, so every time you launch a terminal you will have by default the defined alias that you set before in your .bashrc file. e.g. alias <name_of_the_alias>="<command>".

You can find more info regarding alias here

1

There are several ways you can do this, the most common is probably using an alias

A common alias is using 'll' for 'ls -al', one way you could do that is with the following command:

alias ll='ls-al'

Matt D
  • 56
  • 3