Visit Our UNIX and Linux User Community


shell loading


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers shell loading
# 1  
Old 06-30-2001
shell loading

how do we change our default shell so it will be loaded everytime we login, automatically. i want to use bash instead of the ksh shell that is default. but it irritates me when i have to type it in everytime, just lazy but iīm sure its a simple way someone could tell me?
# 2  
Old 06-30-2001
You can change your shell by running "chsh", you will then be prompted for your new shell.



If you have write access to the /etc/passwd file you could alter it manually.



Also list of available shells can be found in the /etc/shells file.





Andy Hibbins Smilie
# 3  
Old 06-30-2001
HI

One way of doing it is to type the command (that you type to change from ksh to bash shell) in your .profile file. This is in reference to sun os. The .profile file is present in your home directory. that's it. Also while creating new users if you want them to log on by default in bash shell then you can use the -s option of the useradd command.
bye
# 4  
Old 06-30-2001
where do i type in the command in the .profile

i assume i just put a line saying
bash
but i donīt know where to put it, can i see where you would put it in your .profile?
# 5  
Old 06-30-2001
Hi

it depends where do you want to place it. i mean to say if you want to execute some bash commands after setting your default shell to bash then you should probabaly set it before all these commands are placed (for e.g if you want to set the PS1 variable to something other than it's default value then you should place it before the PS1 command.)or this is only thing you want to do then set it at the last. i.e just vi .profile and type the command at the end.
that's it. next time you login you will find yourself in bash shell

Last edited by kapilv; 06-30-2001 at 02:27 PM..
# 6  
Old 06-30-2001
The "best" place (my opinion, that is what I do ... ) to change your default shell is in the last field of the /etc/passwd file. If you have root privs' you can simply edit this file.

If you don't have root privs, ask your system admin.

One thing, if you change this, it is a good idea to make sure the path to your new shell is on the same root partition as the root directory. This way, if you have a mount or filesystem problem when you boot, your shell is on the same disk partition as the boot loader.

Also, make sure your new shell is defined in /etc/shell(s) or similar file (if your environment requires it). In other words, test the shell well before putting it in your login slot in the passwd file.
# 7  
Old 07-01-2001
HI

One more option is (with reference to solaris ) is to use the usermod command with the -s option.
the syntax for the command is
usermod -s "bash shell" "username"
for e.g to set the CSH as the login shell for dummy user
give
usermod -s /bin/csh dummy

Smilie

Last edited by kapilv; 07-01-2001 at 08:51 AM..
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #408
Difficulty: Medium
The Cygwin distribution contains thousands of packages from the Open Source world including most GNU tools, many BSD tools, an X server and a full set of X applications.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

When loading Linux "loading please wait.." then nothing?

Hi everyone, I have a problem but I have never installed a separate OS before so my lingo and understanding may not be as good as some of you. I will try and explain my problem best I can. I am trying to instead of loading Windows 7 when my computer starts up, for it to start linux specifically... (2 Replies)
Discussion started by: markhow30
2 Replies

2. Shell Programming and Scripting

Problem with awk array when loading from shell variable

Hi, I have a problem with awk array when iam trying to use awk in solaris box as below..Iam unable to figure out the problem.. Need your help. is there any alternative to make it in arrays from variable values nawk 'BEGIN {SUBSEP=" "; split("101880|110045 101887|110045 101896|110045... (9 Replies)
Discussion started by: cskumar
9 Replies

3. Shell Programming and Scripting

XDOLoad.sh Korn shell errors out while loading

Hi All, O/S :AIX 6.1 64 bits The following shell script errors out while loading: cat XDOLoad.sh #!/usr/bin/ksh %s_contextfile% %s_adjvaprg% oracle.apps.xdo.oa.util.XDOLoader UPLOAD -DB_USERNAME %s_apps_user% -DB_PASSWORD ${1} -JDBC_CONNECTION... (8 Replies)
Discussion started by: a1_win
8 Replies

4. Shell Programming and Scripting

Loading data in oracle using shell scripts

Hi , I have a scenario, i have a directory where i receive around 14-15 files at a interval of 20-40 min not fixed, i want to write a unix scripts which invoke sqlldr command to load files into oracle automatically as soon as the file hit the directory. Any help will be appreciated. ... (4 Replies)
Discussion started by: guddu_12
4 Replies

5. Shell Programming and Scripting

Loading a tar file into the shell script

Hi All, I am trying to write a shell script in which the contents of a small tar file is loaded into a variable and the same variable contents is moved into another file and finally untaring of the newly created file is done. The Shell Script is as follows: #----Start Of The... (11 Replies)
Discussion started by: wini008
11 Replies

6. Shell Programming and Scripting

background image not loading in newly thrown html page by shell script

I m trying to throw back html page when a file is found.While throwing back html page, the background image is not coming. I am using Apache server.Please suggest how to resolve... #!/bin/ksh echo -e "Content-type: text/html\n\n" echo "<html><head></head><body background=\"/asc/ppp.jpg\">"... (10 Replies)
Discussion started by: ravi18s
10 Replies

7. AIX

loading subsets

In aix 5.2, we are trying to update with the latest subsets for "bos.adt.debug package". the subset version we have is 33 and the latest available is 95. Would like to know whether i need to load all the versions from 34 to 95 or can i load the latest version directly? (1 Reply)
Discussion started by: mjdarm
1 Replies

8. Shell Programming and Scripting

Function loading in a shell scripting like class loading in java

Like class loader in java, can we make a function loader in shell script, for this can someone throw some light on how internally bash runs a shell script , what happenes in runtime ... thanks in advance.. (1 Reply)
Discussion started by: mpsc_sela
1 Replies

9. SuSE

Error when loading

Hi all, I'm trying to install Open SUSE and after the installation it will not boot. At first I thought it could be something wrong with the setup so I re-installed. Then it would still fail on the boot. When trying to boot in safe mode these are the last few lines just before it just sits... (7 Replies)
Discussion started by: woofie
7 Replies

10. Shell Programming and Scripting

Shell Script for Data loading in Oracle

Hi All I am new to unix. I need a shell script to load a datafile in to oracle. I already have a control file, and data file. all I need is if i execute the shell it must load the data using the ctl file to table. Control file : PAY0001.ctl Datafile : mon_grs_det.dat log file :... (3 Replies)
Discussion started by: raghuraja_r
3 Replies

Featured Tech Videos