LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-09-2008, 03:46 AM   #1
linuxtyh
LQ Newbie
 
Registered: Dec 2006
Location: Hangzhou,Zhejiang,China
Distribution: Ubuntu, ArchLinux, SunSolaris
Posts: 12

Rep: Reputation: 0
what does the hyphen mean?


what does the hyphen mean which is before the "bash"


linuxtyh@linuxtyh:/root$ ps f
PID TTY STAT TIME COMMAND
23471 tty2 S 0:00 -bash
17169 pts/2 S 0:00 su linuxtyh
17170 pts/2 R 0:00 \_ bash
17588 pts/2 R+ 0:00 \_ ps f
linuxtyh@linuxtyh:/root$ ps ux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
linuxtyh 17169 0.0 0.0 3876 1172 pts/2 S 16:38 0:00 su linuxtyh
linuxtyh 17170 0.0 0.2 6360 3588 pts/2 R 16:38 0:00 bash
linuxtyh 17691 0.0 0.0 2644 1000 pts/2 R+ 16:46 0:00 ps ux
linuxtyh 23471 0.0 0.2 6352 3560 tty2 S 09:52 0:00 -bash
 
Old 12-09-2008, 04:37 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
It means it is a login shell. From the bash man page:
Code:
INVOCATION
   A  login  shell is one whose first character of argument zero is a -,
   or one started with the --login option.
 
Old 12-09-2008, 05:26 AM   #3
linuxtyh
LQ Newbie
 
Registered: Dec 2006
Location: Hangzhou,Zhejiang,China
Distribution: Ubuntu, ArchLinux, SunSolaris
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you very much for your comment
Quote:
Originally Posted by colucix View Post
It means it is a login shell. From the bash man page:
Code:
INVOCATION
   A  login  shell is one whose first character of argument zero is a -,
   or one started with the --login option.
 
Old 12-10-2008, 06:46 AM   #4
arunmathew1984
Member
 
Registered: Nov 2008
Posts: 31

Rep: Reputation: 15
Thank you for the info colucix. That's something new I learnt today.


Linux Archive

Last edited by arunmathew1984; 12-20-2008 at 12:17 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to cd into dir starting with hyphen? JussiKp Linux - Newbie 2 11-05-2006 09:59 PM
MySQL Fulltext search hyphen workaround using charsets MicahCarrick Linux - Software 0 10-11-2006 02:25 PM
perl: what does the hyphen in function call params mean? johnMG Programming 2 08-19-2005 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration