LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2006, 04:05 AM   #1
knuff
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Rep: Reputation: 0
shell command, computer name


Hi, is there a way to find out the computername in the shell. Something like ./me or something similar?

Thanks for your time.

Knuff
 
Old 08-14-2006, 04:12 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi,

And welcome to LQ!


hostname ?



Cheers,
Tink
 
Old 08-14-2006, 04:29 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Or uname -n

And: Welcome!

Hope this helps.
 
Old 08-14-2006, 05:49 AM   #4
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
or ifconfig


for network address that is.

welcome
 
Old 08-14-2006, 07:49 AM   #5
knuff
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Hello, and thanks for fast replies. Im not able to execute ./hostname nor ./uname
 
Old 08-14-2006, 08:37 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The ./ part is not needed, it even prevents finding the command(s). Your path setting (echo $PATH) is searched and the commands are found (both commands recide in /bin). If you use ./<command> only the current dir is looked at.

Hope this helps.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a command to change your computer name?? lonecrow Linux - Newbie 3 03-30-2006 09:06 PM
Installation of Fedora on Computer with only Command.com on it ketansuri Linux - Newbie 4 12-08-2005 06:14 PM
Shuting computer down in bash shell zWaR Linux - Newbie 4 12-03-2005 12:22 PM
Turning off computer with a single command xuper Linux - Newbie 11 05-27-2005 11:41 AM
changing computer name in shell hamster001 Linux - Newbie 8 10-29-2003 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:40 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