Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi there, I'm the worst kind of newbie on this forum, one who's used unix for a while but never from an admin level. Linux is just familiar enough to be dangerous.
I want to set up tcsh as my main shell, since I'm pretty familiar with it from work, but I'd rather not screw anything up for any of the other users while I'm at it (they're comfortable with bash). Can I do something as simple as rm .bash* from my home directory and replace it with a .cshrc file? Is there a profile file somewhere that sets which shell each user starts up in?
Don't delete any of your .bashrc files or anything. The command to use is chsh, specifically chsh -s /bin/tcsh (while logged in as the user you want to switch the shell for, ie yourself), I gave it a try myself and it didn't work but I suspect that's largely because my system is on the fritz but I recall trying it on other systems and it should work fine for you.
Alternatly you could add the line "tcsh" to your .bashrc but that would leave you with a tcsh running on top of a bash terminal and be really ugly
Essentially, the chsh command modifies the /etc/passwd file. If you want, you can open up the file directly and modify it yourself. Find your username, and the very last field on the line specifies your login shell. Change it to wherever tcsh is installed. Chances are good it's /bin/tcsh like aluchko mentioned. Assuming you were the one that installed it, you'll probably know for sure.
Yeah I ran across the /etc/passwd thing too, the reason I didn't recommend it is because /etc/passwd is only an option if you're root, which I suspect JohnLocke is but I figgured that the chsh is better practice for the times he wants to change and doesn't have root.
Oh, I wasn't suggesting editing /etc/passwd was better, easier, or more convenient by any means.
I just wanted to point out what exactly chsh was modifying a "profile file somewhere that sets which shell each user starts up in". As a beginning admin, I thought he'd find that info useful, and that he has the ability to go and make the changes manually if need be. There's no better way to learn than to get your hands dirty. Unfortunately, there's also no better way to screw something up either
Yeah, playing with files is a fun way to screw things up (sigh my poor system, the /etc/passwd thing was useful info I just didn't want him to get the wrong idea and think the /etc/passwd was the proper or more savvy way to go when at all possible I like to hang away from manually changing files, especially if I'm not 100% on what I'm doing. That being said I'm about to go mucking about in my /etc/X11/XF86Config to try and get the other buttons on my trackball doing something usefull (don't really need backup left and middle clicks).
I had thought of adding tcsh to the .bashrc as a temporary solution, but as you say, I hate excess usage .
So I ran the command and double checked in the /etc/passwd file (yes, thanks for mentioning that, I always like to know multiple ways around things ... in case one doesn't work here or there). Looks like I'm up and running.
/Now/ can I get rid of all the .bash* stuff in my home directory (the only thing useful I had in there was a modification to my path, which I've already put into a .cshrc file)? Changing to .tcsh didn't create any .cshrc file or (what's it for .tcsh as an alternate to .cshrc, .cshrc.tcsh? I forget). I made one myself, but is this correct? As always, don't want to go off half-cocked. Fully cocked or nothing.
From an administrator perspective, I would not delete the .bash* files in your home directory. The simple reason being this: if a user complains about a command doing something wrong, their environment is hosed, or whatever, it's good to have a copy of your own bash configuration files should you need to "jump over" if only temporarily. However, you could get rid of them if you like; it won't hurt you to delete them now that you're using tcsh.
As for the tcsh configuration files, you can read up about them in the tcsh man page. Here are the highlights though: /etc/csh.cshrc -> global config ~/.tcshrc -> personal config; read after /etc/csh.cshrc
Not a bad idea. I should probably work on developing good admin habits like backing things up before I do something stupid . I just like to have a clean slate to work with, including in my home directory. I'll tar them up and put them in a backup location.
Thanks for all the help! I think we've got this one licked.
Hi, I am a newbie at this and have Suse 10.0 installed on an Athlon 64. I was doing an install of a software package that would not work because the company I got it from typically uses tcsh. I was doing a vi on my .cshrc file as follows to set path and set up license key:
set path = $path ~/ssoft/bin
setenv SS_LICENSE_FILE psida.key
And I get an error back about setenv
I modifed my /etc/passwd file (on the company's recommendation). The last line only changed it to /bin/tcsh but I am still getting the same error. Can any one out there educate me? thanks
Changing the line in /etc/passwd will only have effect once you log out (completely) and log back in. All that change does is tell the system to start your user in the tcsh shell automatically when logging in.
Now, to be sure that change is correct, verify that tcsh is in that location. You can do ls -l /bin and look for tcsh. If it's there, great. If not, then tcsh was installed somewhere else on your system, you'll need to locate it, and update that same line in /etc/passwd to reference the proper location.
If you want a quick n' dirty way to test your file, you can launch a tcsh shell from inside a bash shell. At a bash prompt, just type tcsh and you'll be put in a tcsh shell. I don't recall if it sources all the ~/.cshrc or ~/.tcshrc files automatically, but you can do that manually from the command line to test them out (e.g. source ~/.cshrc).