& at the end of yast2

Hi there
Let me know why we need to add & at the end of yast2, example "yast2 sw_single &"
Also what does minus mean in su command "su -"

Comments

  • malcolmlewismalcolmlewis Knowledge Partner
    edited May 25

    Hi and welcome to the Forum :)
    The ampersand (&) just allows it to fork and give the command line back to the shell your running from. For su and the minus (-) ensures the environment used is the user switching to (eg root) and not the user it's coming from.

    su
    printenv |grep $USER
    exit
    su -
    printenv |grep $USER
    
  • Many thanks malcolmlewis,
    i understand now :smile:

Sign In or Register to comment.