Bash 如何逃离“su-arch”?

Bash 如何逃离“su-arch”?,bash,su,Bash,Su,我指定了一个帐户名 现在苏进拱门,命令苏进拱门 如何使用某种转义方法登录帐户名arch?我认为混淆是因为您可以使用 su - # There are no options in this case and the default login is root 但你不应该这么做 su -arch #Anything the follows is an option 由于a不是有效的选项,因此出现了一个错误 正确的方法可能是下面的任何人 su arch su - arch # mind the

我指定了一个帐户名

现在苏进拱门,命令苏进拱门


如何使用某种转义方法登录帐户名arch?

我认为混淆是因为您可以使用

su - # There are no options in this case and the default login is root
但你不应该这么做

su -arch #Anything the follows is an option
由于a不是有效的选项,因此出现了一个错误

正确的方法可能是下面的任何人

su arch 
su - arch # mind the space
su -- arch # The -- marks the end of options, gives way for non-options arguments

这里有几种方法可以使用登录shell进行su

su - arch
su -l arch
su --login arch
问题是使用下面的命令处理选项-没有su-a选项

用途:su-arch
su - arch
su -l arch
su --login arch
su -arch