Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

A bunch of SIMPLE admin questions

Posted on 2002-06-27
13
Medium Priority
?
414 Views
Last Modified: 2010-04-20
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.
0
Comment
Question by:wgilster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 4

Expert Comment

by:newmang
ID: 7115513
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
0
 
LVL 1

Expert Comment

by:bearware
ID: 7115853
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.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7115936
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
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 1

Expert Comment

by:petereilering
ID: 7116105
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
0
 
LVL 1

Author Comment

by:wgilster
ID: 7117005
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

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7117079
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
0
 
LVL 4

Expert Comment

by:newmang
ID: 7119279
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
0
 
LVL 1

Author Comment

by:wgilster
ID: 7121794
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.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7121860
> 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
0
 
LVL 1

Author Comment

by:wgilster
ID: 7122198
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?
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 340 total points
ID: 7122251
> Am I wrong here?
In theory: no. In practice: yes.

Things are simple, and straight forward, for sh and csh.
There it reads /etc/{profile,csh_login,csh_cshrc} then ~/.{profile,login,cshrc}. tcsh follows this way too, but can be improved/configured to behave different.
It's a bit more complicated with ksh (and its variants like pdksh), but i.g. it's like sh.
bash and zsh are the dragons to beat. The default, most commonly used, here is like sh, but it can be completely different. That's why I said you need to know compilation and configuration settings. I'm pedantic, sometimes, somehow ;-)

To summarize:
  i.g. you get a global file from /etc, and a user file from ~ (aka $HOME). That's all, and that's why it is to admin simple.
0
 
LVL 1

Author Comment

by:wgilster
ID: 7122308
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.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7122730
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.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question