LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Tab Key and arrow key (https://www.linuxquestions.org/questions/solaris-opensolaris-20/tab-key-and-arrow-key-318112/)

zillah 04-28-2005 11:36 AM

Tab Key and arrow key
 
With Linux we can use “Tab” Key to complete the name of the file or directory, Is this feature available with Unix, because I have got confuse , as far as I remember it was with V5.7, how can I enable this feature in my Solaris box V10.1 ?

Another thing the arrows key we used to use it to recall previous command, how can we enable this one as well ?

azucaro 04-28-2005 11:40 AM

In Solaris, to recall commands I use ESC then - (minus sign).

I don't know about any file completion options...

jlliagre 04-28-2005 02:26 PM

This is not exactly related to the O/S (Linux, Solaris or whatever), but really to the shell you're using.
completion with tab is a bash feature (default Linux shell), while under ksh (default Solaris user's shell), you first need to set the kind of editing mode you want, e.g. "set -o vi", then use one of "<esc>\" to have a similar functionality than the bash tab, or "<esc>=" to see possible completions choices, and "<esc>*" to have all of them inserted on the line. This works for filenames, but not for commands though.

Googling returned me that page which seems to explain that all:
http://sunsite.uakom.sk/sunworldonli...1-unix101.html

UltraSoul 05-08-2005 03:58 PM

I also use the command of tcsh.
#tcsh

zillah 05-09-2005 04:28 AM

Quote:

I also use the command of tcsh.
#tcsh
It worked with me also

Maidros 05-10-2005 02:15 PM

Re: Tab Key and arrow key
 
Quote:

Originally posted by zillah
With Linux we can use “Tab” Key to complete the name of the file or directory, Is this feature available with Unix, because I have got confuse , as far as I remember it was with V5.7, how can I enable this feature in my Solaris box V10.1 ?

Another thing the arrows key we used to use it to recall previous command, how can we enable this one as well ?

Just change the shell - if you installed other shells like bash, tcsh, zsh (all the three are available in the Solaris 10 - CD2), you can change to whatever shell you want by logging in as superuser and with the command
usermod -s /usr/bin/<tcsh/bash/zsh> username
You can now have whatever shell you want
Regards,
Maidros

zillah 05-10-2005 02:23 PM

Thanks Maidros

Quote:

if you installed other shells like bash, tcsh, zsh (all the three are available in the Solaris 10 - CD2)
As you said, it should have been installed by default, If this the case, then I am going to type in the command line that you have mentioned it.

But in case if it has not been installed by default, how can install it from CD2 (could you please mention the steps for installation)

jlliagre 05-11-2005 02:40 AM

cd /cdrom/cdrom0/.../<directory containing all packages>
pkgadd -d . <packagename>

Maidros 05-11-2005 04:22 AM

Quote:

Originally posted by zillah
Thanks Maidros



As you said, it should have been installed by default, If this the case, then I am going to type in the command line that you have mentioned it.

But in case if it has not been installed by default, how can install it from CD2 (could you please mention the steps for installation)

You can install the three packages SUNWbash, SUNWtcsh, and SUNWzsh. Just follow the steps which Jilliagre mentioned and you should be able to install the three packages.
Regards,
Maidros

zillah 05-26-2005 01:02 AM

I login as root and I tried :

# usermod -s /usr/bin/tsch root
UX: usermod: ERROR: root is in use. Cannot change it.

But I was able to do this:
# usermod -s /usr/bin/tcsh dogcat

If I want to change for root, do I need to login as normal user ? or there is some thing elase ?

If I modified the shell from /etc/passwd , will it do the same job ?

jlliagre 05-26-2005 01:34 AM

Do not change root shell, it's a very wrong idea, and better, do not use directly the root account at all.

zillah 05-26-2005 02:39 AM

Quote:

Do not change root shell, it's a very wrong idea,
Thanks for this advice, but for my knowledge only, if I want to change for the root what shlould I do?
And for normal users can I change it from root account only?



Quote:

do not use directly the root account at all.
Yes I agree with you, but still I can not access the system as normal user.

Quote:

If I modified the shell from /etc/passwd , will it do the same job ?

jlliagre 05-26-2005 02:51 PM

Quote:

Thanks for this advice, but for my knowledge only, if I want to change for the root what shlould I do?
passwd -e
Quote:

And for normal users can I change it from root account only?
Yes if the user account is defined in /etc/passwd file, otherwise users can change their shells, with some restrictions.
Quote:

quote:do not use directly the root account at all.
Yes I agree with you, but still I can not access the system as normal user.
Changing root's shell won't change that last problem.
Quote:

If I modified the shell from /etc/passwd , will it do the same job ?
If you mean editing /etc/passwd and modifying the shell field to change a user's shell, that is correct.


All times are GMT -5. The time now is 12:31 PM.