Author Topic: Here are few questions about Shell commands:)  (Read 879 times)

Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Here are few questions about Shell commands:)
« on: 8 March 2002, 06:36 »
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
Yeah

lost

  • Member
  • **
  • Posts: 48
  • Kudos: 0
    • http://www.23.org/
Here are few questions about Shell commands:)
« Reply #1 on: 8 March 2002, 07:51 »
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?



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
If ignorance is bliss, why aren't there more happy people?

[email protected]


voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Here are few questions about Shell commands:)
« Reply #2 on: 8 March 2002, 21:18 »
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).
Someone please remove this account. Thanks...

dbl221

  • Member
  • **
  • Posts: 253
  • Kudos: 0
Here are few questions about Shell commands:)
« Reply #3 on: 9 March 2002, 03:58 »
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***Comp-Sys walking wounded

dbl221

  • Member
  • **
  • Posts: 253
  • Kudos: 0
Here are few questions about Shell commands:)
« Reply #4 on: 9 March 2002, 04:00 »
Oh almost forgot  the tty in the ps output stands for a terminal or a teletype machine if your old-school.
dbl221***Comp-Sys walking wounded

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Here are few questions about Shell commands:)
« Reply #5 on: 26 November 2002, 01:57 »
quote:
Originally posted by bazoukas:
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?

are you trying to run the nmap frontend?
there is two different nmaps, the graphic nmap(nmapfe) and the console nmap(nmap). When you go to a console and into root, then you type "nmap" it is showing the information about it because with the console nmap you must put options and the ip address in the command
eg: nmap -O -sS -v 205.92.81.80

if you want to run the graphical nmap then you must run the command "nmapfe". So when you login as root on the console then just type nmapfe to run the graphic nmap.

You only need to be root for certain options such as stealth syn scan (-sS)

[ November 25, 2002: Message edited by: The Master of Reality / B0B ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

beltorak0

  • Member
  • **
  • Posts: 223
  • Kudos: 0
    • http://www.angelfire.com/realm/beltorak
Here are few questions about Shell commands:)
« Reply #6 on: 26 November 2002, 07:38 »
If you must set the SUID root bit in nmap/nmapfe, consider creating a separate group for it (nmap), removing the world read/execute bits from nmap/fe, changing it's group to nmap, and adding whatever users you want to that group.  suid root apps are a security hazard by default, and you should maintain control over them.

just to clarify, the linux equiv of the win admin account is root.  you can do anything]/i] as root.  I've blown up my slack install twice in midair by frivolously invoking the power of root.  That was early on, so i didn't need a backup to get going again... hehe. [as an aside, i've also destroyed two DOS3.3's by using debug on COMMAND.COM....][I like to tinker...]

in KDE you can use "kdesu" to launch root programs without binding it to a console; hit ALT-F2, or select run from the K-menu-thingy in the lower left. (what is that thing called anyway? is it the start menu, or is that a windows-ism?)

append to dbl221's comment:
in the early days of computing, teletypes  were the only way to get useful info out of a computer; it was line-printer (more or less).  That's why the most-often used command to display to the screen in programming is "print" (or some variation).  Standards live forever!.

(the info on the above link is apocraphyl)

</ramble>

-t.
from Attrition.Org
 
quote:
Like many times before, Microsoft is re-inventing the wheel and opting for something other than round.

-t.


Bazoukas

  • Member
  • **
  • Posts: 866
  • Kudos: 140
    • http://whitehouse.com
Here are few questions about Shell commands:)
« Reply #7 on: 26 November 2002, 07:42 »
wow, that was a flash back Calum.
 This post is one of the few posts i made that has some signs of IQ in it.
Yeah

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Here are few questions about Shell commands:)
« Reply #8 on: 26 November 2002, 08:20 »
i really gotta read the dates
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'