Link to home
Start Free TrialLog in
Avatar of wgilster
wgilster

asked on

A bunch of SIMPLE admin questions

All of these questions I need answered for a non-graphical command-line driven RHL 7.1 Bash shell.

How do I login to multiple shells in linux?  How do I swap application contexts in linux(like alt-tab in windows)?  How do I open another shell, when my current shell is already performing some action, same as first question only command line isn't available to login to another shell?  How do I see a list of process on my system, 'ps' or 'jobs' doesn't do anything?  Why doesn't the 'netconf' command work on my system (as well as a number of other network commands)?  Ping and Samba seem to work just fine, is it a PATH problem?

Thanks for the help.
Avatar of newmang
newmang

I'll try to answer these in turn but some of your questions are a bit ambiguous and may need clarification.

1) I'm not sure what you are getting at here. You have multiple virtual terminals available to you which you can switch between using the Alt and F1 to F6 keys so you can log in on each of these virtual terminals and run different commands on each.

2) You have to run the first command in the background. You do this by adding & to the end of the command (such as gzip foo.bar &) You can do this any number of times, you can check on the state of your background jobs with the jobs command and you can bring any background job back to the foreground by using the fg %x command where x is the job number returned by the jobs command.

3) To see all the jobs on your system use ps -ef as the command, jobs only tells you what jobs you have running in your current shell in background mode (see my previous answer).

4) When you say that netconf doesn't work do you mean the command can't be found or the command doesn't do what you want it to do? What are you trying to do with the netconf command (my Mandrake system - derived from RH) doesn't have a netconf command.... What other network commands fail?

Cheers - Gavin
Also if a command is runing in fourground press ctrl-Z to suspend it, then type bg to put it in background.

If command are not found type:
#> find / -iname "cmd"

Replace cmd with your command name, you can use * as in bash globs (whildcards) but make shour it is in quotes to bash does not expand it (find has to interperate it)

If you fine the files, then check PATH
type:
#> echo $PATH
if a directory is missing try
#> PATH=$PATH:dir
to append a directory
if this works at it to ~/.profile or /etc/profile
but not to the bashrc files

If you dont find them read the manual on RPM. and install them.
1) login - use rlogin or ssh, then you can suspend them, and start the next login
2) swap application - uspend them (most likely with Ctrl-Z), then use jobs and fg command
3) open another shell - suspend current application (Ctrl-Z), then put in background with bg, then continue in current shell or start a new one with bash, csh, or whatever you like
4) list of processes - ps ax
5) netconf does not work - millions of reasons, please post command and errors
Alt+F3 starts another bash shell and gives you a new login prompt. alt+F1 switches between shells

Install BBkeys and you can use alt+tab to switch between
applications (ofcourse in graphical enviroment like kde,gnome, etc)

In redhat there is no netconf but there is setup you can use
you have to be root so you must use su - to change to root
user do not forget the - character else you do not have the required path
Avatar of wgilster

ASKER

I think you answered all my questions, but in turn brought up a whole new set of questions.  

I was wrong in saying the ps command doesn't work.  It does.
Linux still doesn't find the jobs command. PATH Statement

In RHL, it's netconfig instead of netconf, I guess.  I had to login as root to get the net commands.  They were in /sbin?

I increased the question points to 70 because I have two more questions.

Where can I find a comprehensive document defining all of the config and script files and when they are read-in or executed?

What is the difference between all of these:
su root
su
login root
login
su myname

most administration commands are in /sbin, which is accessable for root by default

su root
  substitute current user with user root, just changes the effective UID
su
  shortcut for  su root  (usually)
login root
  login as user root (effective and real UID are equal)
login
   ask f0r user to login
su myname
  substitute current user with user myname
Re the su command

If you enter su root (or su followed by any other username) you become that user BUT you retain your current environment. To FULLY become the other user and assume their environment you must add a dash to the command as in su - root or su - foobar

Cheers - Gavin
So then does that mean that
su - myname
is the same as
login myname
or what is the difference between the commands?

Do the login scripts for "myname" run when you
su - myname
If they do run, which scripts run (.bashrc, .profile, /etc/profile.d /etc/profile, /etc/bashrc), and are they concatenated onto the current user's environment, or is there some "base user" environment that the "myname" login scripts modify?

I increased the points again.
> or what is the difference between the commands?
AFAIK, none.

> Do the login scripts for "myname" run when you su - myname
Yes (see man su)

> .. which scripts run ..
depnends on the shell specified in /etc/passwd, *and* the shell itself, *and* how it is compiled, *and* how it is installed, and probably some more ...

> .. concatenated onto ..
i.g. the system scripts are read first (from /etc usually), then the user's private scripts (from $HOME, usually), but this all also depends on the shell
I do realize that this flexibility is what makes everything so great in Linux.  But to really know whats happening on any given Linux box, it seems like you have to know about every different shell that could exist then decompile the shell and analize the code to see what is going on.  I guess this is an exageration, but really it doesn't seem that administration is straight forward in Linux.  Am I wrong here?
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Obviously, I have a ton more questions beyond the scope of these, but I need to stop.  All of my questions were answered, quite well.
obviously there are man-pages, which might answer most of your question. Probably the problem is just to select the right one ;-)
Thanks, and good luck.