Need to know this

Hi,

I am using 11.4 Gnome (64bit).

I installed gkrellm to monitor system resources, temp, etc.

One unusual thing I noticed is that it is showing 2 users (i.e. the no. of user logged in =2) whereas only I am logged in.

To find out which users are logged in I used the “users” command in terminal. It prints my username 3 times.

>users 
bob bob bob 

Is this normal?

It appears to be normal. I also found a useful command “w” that shows what they are:

james@linux-l9oq:~> users
james james james
james@linux-l9oq:~> w
 13:02:18 up 16:48,  3 users,  load average: 0.37, 0.47, 0.32
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
james    :0        Sun19   ?xdm?   5:59m  0.03s /bin/sh /usr/bin/startkde
james    pts/0     Sun19   17:48m  0.00s  2.35s kdeinit4: kded4 [kdeinit]                      
james    pts/3     11:13    0.00s  0.12s  0.00s w

Thank You,

And for every terminal window (Konsole, xterm) you start, you get one more :wink:

On 03/14/2011 07:06 PM, jdmcdaniel3 wrote:
>
> I also found a useful command “w”

way cool!!! and nice to know…


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

Thanks a lot to both.

way cool!!! and nice to know…
DenverD, since a single w is a terminal command, it makes wonder what the other 25 letters do? lol!

Thank You,

Try:

man a

until

man z

I found that the three letters l o w all do something but only w has a man command entry. l is a directory command while o is like the less command. You learn something new everyday I guess.

Thank You,

On 03/14/2011 09:06 PM, jdmcdaniel3 wrote:
>
>> way cool!!! and nice to know…DenverD, since a single w is a terminal command, it makes wonder what
> the other 25 letters do? lol!

i can tell you what some of them do, here

alias a=‘atop’
alias c=‘clear’
alias e=‘kate’
alias l=‘ls -alF’
alias m=‘mc’
alias n=‘ntop’
alias o=‘less’
alias s=‘su -’
alias t=‘top’
alias x=‘exit’


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

On 03/14/2011 09:36 PM, jdmcdaniel3 wrote:
>
> I found that the three letters l o w

l and o have an alias… w is an executable

denverd@linux:~> which w
/usr/bin/w

type alias at a terminal to see all the aliases

send me a Shiner and i’ll tell you how you can have some more, also!!


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

So here are the alias’ I seem to have by default in openSUSE 11.4

james@linux-l9oq:~> alias
alias +='pushd .'
alias -='popd'                                                                                                                                                
alias ..='cd ..'                                                                                                                                              
alias ...='cd ../..'                                                                                                                                          
alias beep='echo -en "\007"'                                                                                                                                  
alias cd..='cd ..'
alias dir='ls -l'
alias l='ls -alF'
alias la='ls -la'
alias ll='ls -l'
alias ls='ls $LS_OPTIONS'
alias ls-l='ls -l'
alias md='mkdir -p'
alias o='less'
alias rd='rmdir'
alias rehash='hash -r'
alias unmount='echo "Error: Try the command: umount" 1>&2; false'
alias you='if test "$EUID" = 0 ; then /sbin/yast2 online_update ; else su - -c "/sbin/yast2 online_update" ; fi'

Being able to add an alias seems simple enough, but is it worth such a good beer as a Shiner to know how to make the assignment stick? How about a virtual six pack instead?

http://thumbnails36.imagebam.com/12359/a50fe6123582739.jpg](http://www.imagebam.com/image/a50fe6123582739)

Thank You,

On 2011-03-14 23:06, jdmcdaniel3 wrote:

> --------------------
> Being able to add an alias seems simple enough, but is it worth such a
> good beer as a Shiner to know how to make the assignment stick? How
> about a virtual six pack instead?

~/.alias

But SUSE puts them in /etc/bash.bashrc.

What do I get? :wink:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Since the actual file you should use, (per the text in /etc/bash.bashrc, no period at the end) was said to be /etc/bash.bashrc.local, you get a couple of virtual six packs for providing almost correct information.

http://thumbnails36.imagebam.com/12359/a50fe6123582739.jpg](http://www.imagebam.com/image/a50fe6123582739)

http://thumbnails36.imagebam.com/12359/a50fe6123582739.jpg](http://www.imagebam.com/image/a50fe6123582739)

But you did send me to the right place to look.

Thank You,

On 2011-03-15 01:36, jdmcdaniel3 wrote:
>
> Since the actual file you should use, (per the text in
> /etc/bash.bashrc, no period at the end) was said to be
> /etc/bash.bashrc.local, you get a couple of virtual six packs for
> providing almost correct information.

Thanks! :slight_smile:

(even though I prefer cider :slight_smile: )

I didn’t notice you were asking for the place to add yours, so I said the
place where we are getting all those default aliases. I would rather use
~/.alias myself, as the one in etc is for all users.

Ah, the period at the end was the end of sentence, not intended as part of
the file name. I understand the confusion.

Just note that the file /etc/aliases is for mail aliases, not bash aliases.
It is curious that it is there instead of /etc/mail/ or /etc/postfix.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 03/15/2011 02:33 AM, Carlos E. R. wrote:

> I would rather use
> ~/.alias myself, as the one in etc is for all users.

since i’m the only user here, AND i want x to always mean “exit” (if
i’m me, ‘test’ or root) i put them in /etc/bash.bashrc.local

but, James be a little careful because as you can see there already
exists both alises and scattered short executables before you (or
anyone) begins adding their own…and, i’m not sure what would happen
if you added a new alias for a previously existing one, but it might
cause you to freeze your Shiner!

oh, another caution: though most folks say there is no need to backup
the system files, archive a copy of your /etc/bash.bashrc.local to a
place that won’t be wiped during upgrade/install :wink:


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

The user should put them in his/her ~/.alias. In his/her ~/.bashrc she/he will find:

henk@boven:~> grep alias .bashrc
test -s ~/.alias && . ~/.alias || true
henk@boven:~>

In other words: when there is a file ~/.alias, add the contents to ~/.bashrc.
Thus when you want extra aliases there is a neat well defined place for them.

Amazing the power/elegance/’‘cryptic-ness’’ of bash scripting.

But I can’t see how this part

. ~/.alias || true

add the contents of the existing file to .bashrc.

Have to study a bit more… :slight_smile:

On 2011-03-19 22:36, brunomcl wrote:

> But I can’t see how this part
>> . ~/.alias || true
>>
> add the contents of the existing file to .bashrc.

The syntax “dot space file” imports the variables in the inserted file.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)