Operating Systems > Linux and UNIX
Here are few questions about Shell commands:)
Bazoukas:
Instead of coming back and posting a question at a time I try to gather as many of my questions and post them all.
Am reading a book about Red Hat and its realy helpfull but here are some things the book wont explain.
a)when I write ps aux for example, what does the TTY stand for?
b) I launched few programs from shell examples: anjuta & gaim & galeon & nmap &. Then I did a ps aux.
The funny thing was that under Time, only galeon had running time. The time on the other applications were 00:00:00
c)what is the difference of running xosview for example with
ps aux | fgrep xosview and ps 11670?
The fgrep seems more detailed with details.
b) What is the advantages (that i cant see) of launching programs from the shell window? When i close the shell all programs that i opened with it close as well.
d) in NMAP, when i launch it, it says I am not in as root. I went into shell loged as root and launched the program through there. It only gave me info about the program. How do you log in as root when a program tells you, you are not in as root? Is there an administrator account like in Win2k?
weeeell thats about.
I know these questions must be stupid for you, but am realy trying to learn Linux. I read the book but allas the book doesnt say everything.
thank you and take it easy on me...am a Linux noob:-D
lost:
quote:Originally posted by bazoukas:
Instead of coming back and posting a question at a time I try to gather as many of my questions and post them all.
Am reading a book about Red Hat and its realy helpfull but here are some things the book wont explain.
a)when I write ps aux for example, what does the TTY stand for?
b) I launched few programs from shell examples: anjuta & gaim & galeon & nmap &. Then I did a ps aux.
The funny thing was that under Time, only galeon had running time. The time on the other applications were 00:00:00
c)what is the difference of running xosview for example with
ps aux | fgrep xosview and ps 11670?
The fgrep seems more detailed with details.
b) What is the advantages (that i cant see) of launching programs from the shell window? When i close the shell all programs that i opened with it close as well.
d) in NMAP, when i launch it, it says I am not in as root. I went into shell loged as root and launched the program through there. It only gave me info about the program. How do you log in as root when a program tells you, you are not in as root? Is there an administrator account like in Win2k?
--- End quote ---
Hopefully i can answer your questions.
a) tty is a terminal device. tty1-6 are the available terminals when you sit console. The tty is what termianl the process is running on.
b)Dont know why your process dotn have a timestamp though.
c)the ps aux|grep is searches your ps aux output for the pattern, then outputs to you the lines you are looking for. doing ps [id] assumes you already know what the process id is. ps aux [id] and you will get the same output.
d)nmap shouldnt need to run as root, jst using certain flags like -O or -sS. what is the nmap command you are trying to run? just running nmap without providing and ip or a block will just output the nmap --help.
Hope that answers everything
voidmain:
If logged on as a normal user you can type "su", then ENTER. Enter the root password and you'll be root. You can then run nmap. Another way if you want to run it from normal user accounts turn on the SUID bit (chmod u+s /usr/bin/nmap).
dbl221:
hmmm as I recal fgrep only takes string literals...ie hust strings while grep takes a wider variety of types.
Nmap and other such tools require root since they tend to do funny things to the network card like put into promiscuous mode.
The shell kid of grows on you after a while....good luck.
dbl221:
Oh almost forgot the tty in the ps output stands for a terminal or a teletype machine if your old-school.
Navigation
[0] Message Index
[#] Next page
Go to full version