My default shell environment is bash
and I would like to start a xterm
with zsh
and execute some commands.
In general, to execute some commands, I am using the following
xterm -e "ls -lrt;pwd;whoami"
This is executing the commands in bash
shell with xterm
.
To start the xterm
with different shell, I am using the following.
xterm -ls /bin/zsh
So, how can I combine both of these ? When I tried. I got the below error.
[dinesh@mypc]$ xterm -ls /bin/zsh -e "ls"
xterm: bad command line option "/bin/zsh"
How to solve this ?
Best Answer
No, the
-ls
option toxterm
doesn't take an argument, it just specifies that the shell thatxterm
start should be a login shell.Here's the complete section on the
-ls
flag with the part which is relevant to your issue highlighted: