LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 04-28-2005, 11:36 AM   #1
zillah
Member
 
Registered: Oct 2004
Posts: 536

Rep: Reputation: 30
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 ?
 
Old 04-28-2005, 11:40 AM   #2
azucaro
Member
 
Registered: Jan 2005
Location: Washington, D.C.
Distribution: Arch (Custom), CentOS
Posts: 239

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

I don't know about any file completion options...
 
Old 04-28-2005, 02:26 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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
 
Old 05-08-2005, 03:58 PM   #4
UltraSoul
Member
 
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404

Rep: Reputation: 31
I also use the command of tcsh.
#tcsh
 
Old 05-09-2005, 04:28 AM   #5
zillah
Member
 
Registered: Oct 2004
Posts: 536

Original Poster
Rep: Reputation: 30
Quote:
I also use the command of tcsh.
#tcsh
It worked with me also
 
Old 05-10-2005, 02:15 PM   #6
Maidros
Member
 
Registered: Jan 2004
Location: Haifa, Israel
Distribution: Debian, FreeBSD, Solaris
Posts: 101

Rep: Reputation: 15
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
 
Old 05-10-2005, 02:23 PM   #7
zillah
Member
 
Registered: Oct 2004
Posts: 536

Original Poster
Rep: Reputation: 30
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)
 
Old 05-11-2005, 02:40 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
cd /cdrom/cdrom0/.../<directory containing all packages>
pkgadd -d . <packagename>
 
Old 05-11-2005, 04:22 AM   #9
Maidros
Member
 
Registered: Jan 2004
Location: Haifa, Israel
Distribution: Debian, FreeBSD, Solaris
Posts: 101

Rep: Reputation: 15
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
 
Old 05-26-2005, 01:02 AM   #10
zillah
Member
 
Registered: Oct 2004
Posts: 536

Original Poster
Rep: Reputation: 30
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 ?

Last edited by zillah; 05-26-2005 at 01:03 AM.
 
Old 05-26-2005, 01:34 AM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Do not change root shell, it's a very wrong idea, and better, do not use directly the root account at all.
 
Old 05-26-2005, 02:39 AM   #12
zillah
Member
 
Registered: Oct 2004
Posts: 536

Original Poster
Rep: Reputation: 30
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 ?
 
Old 05-26-2005, 02:51 PM   #13
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Arrow Key mapping lazlom AIX 5 06-21-2004 03:32 PM
down arrow key problem rcbob Linux - Software 0 06-05-2004 07:58 PM
Detecting Arrow Key Presses in C / C++ BooKA. Programming 8 04-07-2004 06:10 AM
When i press tab key on my rh7.3 i was logged out automatically. nbalu Linux - Software 1 11-14-2003 03:58 PM
Left tab key bajen_hasse Linux - Software 0 02-27-2003 02:22 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration