Author Topic: How do you find out ...  (Read 673 times)

heljy

  • Member
  • **
  • Posts: 70
  • Kudos: 0
How do you find out ...
« on: 31 October 2002, 20:41 »
...from the commandline which kernel you are using?

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
How do you find out ...
« Reply #1 on: 31 October 2002, 20:51 »
i am sure i read something about telling whether you are using bash.

uname -a

[ October 31, 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'

KernelPanic

  • VIP
  • Member
  • ***
  • Posts: 1,878
  • Kudos: 222
How do you find out ...
« Reply #2 on: 31 October 2002, 21:51 »
well done mor you managed to completely misinterpret his question!  
Contains scenes of mild peril.

foobar

  • Member
  • **
  • Posts: 308
  • Kudos: 0
    • http://www.fuckmicrosoft.com
How do you find out ...
« Reply #3 on: 31 October 2002, 22:08 »
( lol )

If you want to see your default shell, take a peek at
/etc/passwd. So if your username would be 'joe':

$ cat /etc/passwd | grep 'joe'

(You could leave the "| grep 'joe'" part away, but what if your passwd file is extremely long?)

Your default shell should be somewhere on that entry that describes your username.

But If you want to know what kernel you are using,
try

$ uname -h
Linux user #283039

Gosh, I love Linux Quake.


voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
How do you find out ...
« Reply #4 on: 31 October 2002, 23:31 »
I believe he said "kernel", not "shell". In which case you would do this:

$ cut -d' ' -f3 /proc/version

or

$ dmesg | grep "^Linux version" | cut -d' ' -f3

But you really want to find out what your login shell is you could:

$ chsh

or

$ grep $USER /etc/passwd | cut -d':' -f7

or

$ echo $SHELL

or

$ env | grep SHELL

or

$ set | grep -i shell

or

$ which $SHELL

or

$ lkasjdflkasjdf

which will produce an error message indicating the shell from which the error was produced (in most shells, but not in csh/tcsh).

[ October 31, 2002: Message edited by: void main ]

Someone please remove this account. Thanks...

preacher

  • VIP
  • Member
  • ***
  • Posts: 858
  • Kudos: 107
    • http://kansascity.cjb.net
How do you find out ...
« Reply #5 on: 1 November 2002, 00:02 »
Go to the command line and type

"uname -r"

this will tell you the exact kernel you are using.
Kansas City Hustle
http://kansascity.cjb.net

hm_murdock

  • VIP
  • Member
  • ***
  • Posts: 2,629
  • Kudos: 378
  • The Lord of Thyme
How do you find out ...
« Reply #6 on: 1 November 2002, 00:48 »
what about checking the documentation that came with your distro?
Go the fuck ~

heljy

  • Member
  • **
  • Posts: 70
  • Kudos: 0
How do you find out ...
« Reply #7 on: 3 November 2002, 10:49 »
Thanks for your help guys.

Just that I was asked this question when interviewing for a Student Unix Admin positin. Unfortunately, I didnt get it  :(

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
How do you find out ...
« Reply #8 on: 3 November 2002, 11:20 »
Maybe you didn't take a shower after doing your barn chores before going to school that morning?    Sorry about that, I noticed where you are from which is very close to where I am originally from, in fact I'm headin' up that way on Monday for a couple of days. I grew up on a farm and a lot of us farm kids smelled up the school fast and in a hurry if we were running late with chores and didn't have time for a shower. But you are probably one of those city boys...
Someone please remove this account. Thanks...

heljy

  • Member
  • **
  • Posts: 70
  • Kudos: 0
How do you find out ...
« Reply #9 on: 5 November 2002, 11:01 »
quote:
Originally posted by void main:
Maybe you didn't take a shower after doing your barn chores before going to school that morning?     Sorry about that, I noticed where you are from which is very close to where I am originally from, in fact I'm headin' up that way on Monday for a couple of days. I grew up on a farm and a lot of us farm kids smelled up the school fast and in a hurry if we were running late with chores and didn't have time for a shower. But you are probably one of those city boys...


   Well, I am an international student, so I guess it doesnt apply  :D