UNIX Basics about shell and editors and default settings


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers UNIX Basics about shell and editors and default settings
# 1  
Old 09-20-2015
UNIX Basics about shell and editors and default settings

Hi all,
I have 3-4 years of experience working on unix environment. I am not a beginner, but unix is not my primary skill set. I am very good at awk programming and doing many of my tasks very well, really very weak on basics. I moved to a new job recently and the settings there are driving me nuts. Following are my questions:

1) Who decides what shell would be default when we login to unix enviroment? Is there any way we can overide it?

2) I am currently using korn shell and i was using the same shell in my old job, but i am not able to mimic mostly of the usual commands and functionality at my new environment. The things that are driving me nuts is :

- not able to use arrows on command line , gives me garbage
- escape \ to get the command history
- autocomplete the filenames
- when i use the vi editor, it does even tell me which mode i am in, when i press insert it changes the case of the text
- not able to use page up and page down to scroll through scripts

Many other things. they are very basic but i am so used to all these settings , it is literally driving me nuts. Can someone help me what settings need to be done?

Also some one can point to some books/documentation to understand the basics about shells and the settings and different editors how and when to use it would really help me a lot ! Thanks in advance .
# 2  
Old 09-20-2015
What operating system were you using before? What operating system are you using now? What output do you get from the command?:
Code:
uname -a

How is the TERM environment variable set? What locale are you using? What are you using as a terminal or terminal emulator when logging in to your current system? What output do you get from the command?:
Code:
env

What shell settings are you using in the Korn shell? What output do you get from the command?:
Code:
set -o

If you can show us the output from the above requested command on your current system, it will help. If you can also show us the output from the above commands on your previous system, it will help us see things that are different between the two systems.
# 3  
Old 09-21-2015
Old Job :

Code:
uname -a 

Linux pito.intra.doomsday.com 2.6.32-573.3.1.el6.x86_64 #1 SMP Thu Aug 13 22:55:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Code:
env 

LESSKEY=/etc/lesskey.bin
INFODIR=/usr/local/info:/usr/share/info:/usr/info
NNTPSERVER=news
SCH_TOP=/aoi/RdwProd/sched
BTICFG=/opt/bti/cfg/bti.cfg
HOSTNAME=pito.intra.doomsday.com
GNOME2_PATH=/usr/local:/opt/gnome:/usr
XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
SysName=pito.intra.doomsday.com
TDP_PDN_NODE=smp001-8
OPS_BIN=/aoi/RdwProd/ops/bin
TERM=xterm
SHELL=/usr/bin/ksh
PROFILEREAD=true
HISTSIZE=2000
SSH_CLIENT=172.28.18.168 65440 22
PERL5LIB=:/usr/lib64
s01=16
LCI_TOK=/aoi/RdwProd/appl/token
s00=11
QTDIR=/usr/lib/qt3
QTINC=/usr/lib64/qt-3.3/include
TDP_NODES=157.241.20.10,157.241.20.13,157.241.20.16,157.241.20.19,157.241.20.22,157.241.20.25
SSH_TTY=/dev/pts/12
LCI_TOP=/aoi/RdwProd/appl
JRE_HOME=/usr/lib/java/jre
USER=aloobondam
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:::
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
XNLSPATH=/usr/X11R6/lib/X11/nls
LC_MPATH=/opt/teradata/gsctools/sial
HOSTTYPE=x86_64
TDP_INST1=TD00
SCH_TOK=/aoi/RdwProd/sched/token
PAGER=less
LCI_LAY=/aoi/RdwProd/appl/layouts
TDP_INST2=TD00
MINICOM=-c
MAIL=/usr/mail/aloobondam
PATH=/aoi:/aoi/RdwProd/appl/bin:/aoi/RdwProd/ops/bin:/aoi/RdwProd/sched/bin:.:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/auto/aloobondam/bin:/appl/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/auto/aloobondam/bin:/usr/bin/X11:/sbin:.:/opt/ctmagent/ctmag:/home/auto/aloobondam/xml/XML-Parser-2.36:/appl/hdcdw/prod/scripts:/home/auto/aloobondam/bin:/appl/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/auto/aloobondam/bin:/usr/bin/X11:/sbin:.:/opt/ctmagent/ctmag:/aoi:/aoi/RdwProd/appl/bin:/aoi/RdwProd/ops/bin:/aoi/RdwProd/sched/bin:.:/aoi:/aoi/RdwProd/appl/bin:/aoi/RdwProd/ops/bin:/aoi/RdwProd/sched/bin:/aoi:/aoi/RdwProd/appl/bin:/aoi/RdwProd/ops/bin:/aoi/RdwProd/sched/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin:/appl/bin/CommonObjects:
JRE5_64_ROOT=/opt/teradata/jvm64/jre5/jre
JRE5_64_BINDIR=/opt/teradata/jvm64/jre5/jre/bin
CPU=x86_64
LCI_BIN=/aoi/RdwProd/appl/bin
JAVA_BINDIR=/usr/lib/java/jre/bin
TD_ICU_DATA=/opt/teradata/client/14.00/tdicu/lib
INPUTRC=/etc/inputrc
PWD=/home/auto/aloobondam/PCIVLT/kmart/scenario3
SCH_USER_MSG=/aoi/RdwProd/sched/msgs
JAVA_HOME=/usr/lib/java/jre
LANG=en_US.UTF-8
COPLIB=/opt/teradata/client/14.00/lib
OPS_TOP=/aoi/RdwProd/ops
PS1=${USER}@${HOSTNAME}:$PWD>
$
dbc=16
HISTCONTROL=ignoredups
SCH_BIN=/aoi/RdwProd/sched/bin
TEXINPUTS=:/home/aoiops/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
SHLVL=1
HOME=/home/auto/aloobondam
SCH_ENV=RdwProd
LCI_DAT=/aoi/RdwProd/appl/data
LESS_ADVANCED_PREPROCESSOR=no
OSTYPE=linux
LCI_LOG=/aoi/RdwProd/appl/log
no_proxy=localhost
LCI_ENV=RdwProd
XCURSOR_THEME=crystalwhite
QRY_HOME=/aoi/RdwProd/sched/query
WINDOWMANAGER=/usr/X11R6/bin/kde
SCH_STAGE=/aoi/RdwProd/sched/stage
LC_IPATH=/opt/teradata/gsctools/sial
GTK_PATH=/usr/local/lib64/gtk-2.0:/opt/gnome/lib64/gtk-2.0:/usr/lib64/gtk-2.0
COPERR=/opt/teradata/client/14.00/lib
MACHTYPE=x86_64-suse-linux
LOGNAME=aloobondam
BTIDIR=/opt/bti
QTLIB=/usr/lib64/qt-3.3/lib
CVS_RSH=ssh
SSH_CONNECTION=172.28.18.168 65440 157.241.58.77 22
PKG_CONFIG_PATH=/opt/gnome/lib64/pkgconfig
LESSOPEN=||/usr/bin/lesspipe.sh %s
ACLOCAL_PATH=/opt/gnome/share/aclocal
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/opt/gnome/share/info
JRE5_64_HOME=/opt/teradata/jvm64/jre5/jre
SCH_DAT=/aoi/RdwProd/sched/data
G_BROKEN_FILENAMES=1
COLORTERM=1
JAVA_ROOT=/usr/lib/java
_=/bin/env
OLDPWD=/home/auto/aloobondam/dem/prt

Code:
set -o

allexport       off
braceexpand     on
emacs           off
errexit         off
errtrace        off
functrace       off
hashall         on
histexpand      on
history         on
ignoreeof       off
interactive-comments    on
keyword         off
monitor         on
noclobber       off
noexec          off
noglob          off
nolog           off
notify          off
nounset         off
onecmd          off
physical        off
pipefail        off
posix           off
privileged      off
verbose         off
vi              on
xtrace          off

---------- Post updated at 10:22 PM ---------- Previous update was at 10:12 PM ----------

New Job:

Code:
uname -a

SunOS infaetldev01 5.10 Generic_150400-23 sun4v sparc sun4v

Code:
env

_=/usr/bin/env
MANPATH=/usr/share/man:/opt/teradata/client/14.10/odbc_32/help/man::/usr/man:/usr/local/man
LANG=en_US.UTF-8
CPU=x86_64
SCH_ENV=RdwProd
NLSPATH=/opt/teradata/client/14.10/tbuild/msg/%N:/opt/teradata/client/14.10/odbc_32/msg/%N:
GTK_PATH=/usr/local/lib64/gtk-2.0:/opt/gnome/lib64/gtk-2.0:/usr/lib64/gtk-2.0
G_BROKEN_FILENAMES=1
PAGER=less
LC_IPATH=/opt/teradata/gsctools/sial
PROFILEREAD=true
SSH_TTY=/dev/pts/2
PATH=.:/opt/teradata/client/14.10/tbuild/bin:/usr/bin:/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/openv/netbackup/bin:/opt/epage/bin:/usr/openv/volmgr/bin:/opt/csw/bin:/opt/csw/sbin:/usr/lib/ssh:/usr/ccs/bin:/home/disc/alavsx1/bin:/appl/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/disc/alavsx1/bin:/usr/bin/X11:/sbin:.:/opt/ctmagent/ctmag:/aoi:/aoi/RdwProd/appl/bin:/aoi/RdwProd/ops/bin:/aoi/RdwProd/sched/bin:.:/aoi:/aoi/RdwProd/appl/bin:/aoi/RdwProd/ops/bin:/aoi/RdwProd/sched/bin:/aoi:/aoi/RdwProd/appl/bin:/aoi/RdwProd/ops/bin:/aoi/RdwProd/sched/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin:/appl/bin/CommonObjects:
BTICFG=/opt/bti/cfg/bti.cfg
LC_ALL=C
XNLSPATH=/usr/X11R6/lib/X11/nls
JAVA_BINDIR=/usr/lib/java/jre/bin
LCI_ENV=RdwProd
LC_MPATH=/opt/teradata/gsctools/sial
ACLOCAL_PATH=/opt/gnome/share/aclocal
no_proxy=localhost
XCURSOR_THEME=crystalwhite
LCI_DAT=/aoi/RdwProd/appl/data
NNTPSERVER=news
COPERR=/opt/teradata/client/14.10/lib
LESSKEY=/etc/lesskey.bin
EDITOR=vi
CLASSPATH=/opt/teradata/client/14.10/jmsaxsmod/jmsam.jar
LCI_LAY=/aoi/RdwProd/appl/layouts
LOGNAME=alavsx1
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/opt/gnome/share/info
INPUTRC=/etc/inputrc
COPLIB=/opt/teradata/client/14.10/lib
MAIL=/usr/mail/alavsx1
JRE5_64_BINDIR=/opt/teradata/jvm64/jre5/jre/bin
TDP_PDN_NODE=smp001-8
PS1=${USER}@${ert}:$PWD>
$
SysName=infaetldev01
BTIDIR=/opt/bti
XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
SCH_DAT=/aoi/RdwProd/sched/data
KRB5CCNAME=FILE:/tmp/krb5cc_666027
USER=alavsx1
LCI_LOG=/aoi/RdwProd/appl/log
JRE_HOME=/usr/lib/java/jre
QRY_HOME=/aoi/RdwProd/sched/query
SCH_TOP=/aoi/RdwProd/sched
LCI_TOK=/aoi/RdwProd/appl/token
COLORTERM=1
TDP_NODES=157.241.20.10,157.241.20.13,157.241.20.16,157.241.20.19,157.241.20.22,157.241.20.25
TD_ICU_DATA=/opt/teradata/client/14.10/tdicu/lib
https_proxy=http://proxy.ghc.org:8080/
SHELL=/usr/bin/ksh
SCH_TOK=/aoi/RdwProd/sched/token
HOSTTYPE=x86_64
EPAGE_HOME=/opt/epage
GNOME2_PATH=/usr/local:/opt/gnome:/usr
JAVA_HOME=/usr/lib/java/jre
LESS_ADVANCED_PREPROCESSOR=no
OPS_TOP=/aoi/RdwProd/ops
LCI_TOP=/aoi/RdwProd/appl
HISTSIZE=2000
PKG_CONFIG_PATH=/opt/gnome/lib64/pkgconfig
SCH_USER_MSG=/aoi/RdwProd/sched/msgs
OSTYPE=linux
HOME=/home/disc/alavsx1
WINDOWMANAGER=/usr/X11R6/bin/kde
JAVA_ROOT=/usr/lib/java
TEXINPUTS=:/home/aoiops/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
MINICOM=-c
SCH_BIN=/aoi/RdwProd/sched/bin
SSH_CONNECTION=199.30.37.181 53638 10.2.51.70 22
SSH_CLIENT=199.30.37.181 53638 22
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:::
TERM=xterm
QTDIR=/usr/lib/qt3
SCH_STAGE=/aoi/RdwProd/sched/stage
PWD=/home/disc/alavsx1
dbc=16
PERL5LIB=:/usr/lib64
MACHTYPE=x86_64-suse-linux
TZ=US/Pacific
INFODIR=/usr/local/info:/usr/share/info:/usr/info
http_proxy=http://proxy.ghc.org:8080/
JRE5_64_ROOT=/opt/teradata/jvm64/jre5/jre
LESS=-CewiMPM--?f%f-- :More--.?pb%pb\% .?lbline %lb.?L of %L.--.
TDP_INST2=TD00
s01=16
s00=11
OPS_BIN=/aoi/RdwProd/ops/bin
LCI_BIN=/aoi/RdwProd/appl/bin
JRE5_64_HOME=/opt/teradata/jvm64/jre5/jre
TDP_INST1=TD00

Code:
set -o

Current option settings
allexport        off
bgnice           on
emacs            off
errexit          off
gmacs            off
ignoreeof        off
interactive      on
keyword          off
markdirs         off
monitor          on
noexec           off
noclobber        off
noglob           off
nolog            off
notify           off
nounset          off
privileged       off
restricted       off
trackall         off
verbose          off
vi               on
viraw            off
xtrace           off

I am using Putty - in the old and current job.
# 4  
Old 09-21-2015
Your default shell when you login is defined in: /etc/passwd
Are you sure its the same?
Code:
ksh --version

hth
# 5  
Old 09-21-2015
Interactive features like braceexpand and histexpand only exist in pdksh (optional on Linux) and ksh93 (Solaris 11).
But you have got ksh88 on Solaris 10.
Regarding command history, get comfortable with the fc command! (I never did.)
Code:
man fc

Alternatively you can try bash on Solaris 10.
# 6  
Old 09-21-2015
You can also do "which bash". I supported Solaris. The person who I worked with really wanted to use tcsh, and I would rather use bash. So every time I connected to a server, I needed to type bash to get the bash shell. Then I could maintain a .bashrc file to set preferences the way that I wanted them to be. This should work for you as well. There are plenty of sample .bashrc files on the web.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX basics

Hi, I am new to Unix. can you explain in brief with examples what is variable, what is argument and what is parameter? i searched a lot on other forums but not able to find a appropriate answer. thanks in advance!! (3 Replies)
Discussion started by: 21laps
3 Replies

2. UNIX for Dummies Questions & Answers

UNIX Basics

Hello, 1) I am trying to get involved in UNIX for educational purposes so I have installed the latest Ubuntu edition 12.04. Do you know another package that I could use it instead for educational purposes? 2)What is the difference between "~$" and "/$" (it comes with cd / and cd ~) .The... (1 Reply)
Discussion started by: Iwn
1 Replies

3. Shell Programming and Scripting

LEARN SHELL SCRIPTING BASICS

I am beginner to the SHELL SCRIPT and want to Learn SHELL SCRIPT Basics. This thread should help to all beginners who want to learn SHELL SCRIPT *** Thanks in advance to those who will contribute on this thread *** Please guide me and all beginners... 1. Is there any good e-book... (3 Replies)
Discussion started by: sagarsbhandare
3 Replies

4. Shell Programming and Scripting

SHELL Scripting Basics

Hi, I am new to shell scripting, i have experience in solaris, can anyone share me the link and experience to learn shell scripting from basics Thanks RJS (2 Replies)
Discussion started by: rajasekg
2 Replies

5. Shell Programming and Scripting

Shell basics

Hi All, I have a basic question in Scripting. Can anyone tell me what is the difference b/w the two syntax : if (( $lines = 0 )); and if ; when do we use the square brackets & when to use the paranthesis. Thanks, Pradeep (3 Replies)
Discussion started by: pradeep_desh
3 Replies

6. Shell Programming and Scripting

Basics of shell scripting

Anybody please tell me basics of shell scripts (2 Replies)
Discussion started by: arvind.elle
2 Replies

7. UNIX for Dummies Questions & Answers

Unix Basics

Hey, you said this forum was for Dummies, so don't blame me for the following! :D My whole "web building" life, I've had my sites hosted in one for or another. Lately, I've gotten into PHP and MySQL and, of course, those are also hosted for me. But lately, I've been thinking of using PHP and... (2 Replies)
Discussion started by: cap97
2 Replies

8. UNIX for Dummies Questions & Answers

Editors for UNIX

Where can i find editors for UNIX? thanks (5 Replies)
Discussion started by: Inbal
5 Replies

9. UNIX for Dummies Questions & Answers

UNIX Basics

I want to learn UNIX, but I have a few questions. If anybody could help me out I'd greatly appreciate it. First, I've decided I'm going to use Red Hat Linux and I've been told the only difference between 7.2 and the Professional (besides the price), is the tech support that you'll receive. Is... (2 Replies)
Discussion started by: paulSF
2 Replies
Login or Register to Ask a Question