Visit Our UNIX and Linux User Community

domainname command

Thread Tools Search this Thread
Operating Systems Linux domainname command
# 1  
Old 12-03-2004
domainname command


I've been on this for a while... can somebody explain to me what the domainname command really does. The man pages don't tell enough. And how can i have the domain name set so it will be the same all the time when the OS boots up.
# 2  
Old 12-03-2004
for the DOMAIN could i set it in the /etc/sysconfig/network file? And if so would i tlook like this
# 3  
Old 12-03-2004
The solaris manual page is a lot better than most at describing this command (some of the *BSD's I've seen give a terse two sentence description)...

And yes, something along the lines of
inside /etc/sysconfig/network should do the trick.

You may also need to specify the local domain name in /etc/resolv.conf

# 4  
Old 12-03-2004
perfect man, that looks as if it'll do the trick! thanks.
# 5  
Old 12-03-2004
ummmmm i edited the /etc/sysconfig/network and added a domain name in there and when i type domainname it doesn't bring anything up. If i type
then it will work. Weird

I've got a practical test on tuesday so i'm trying to figure everything out haha. Does anybody know why this happens?

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Another one line command where I'd like to determine if Ubuntu or Red Hat when running command

Hello Forum, I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies

2. AIX

I'm facing problem with rpm command, when running the command and appears this error:

exec(): 0509-036 Cannot load program /usr/opt/freeware/bin/rpm because of the following errors: 0509-022 Cannot load module /opt/freeware/lib/libintl.a( 0509-150 Dependent module /opt/freeware/lib/libiconv.a(shr4.o) could not be loaded. 0509-152 Member... (4 Replies)
Discussion started by: Ohmkar
4 Replies

3. UNIX for Dummies Questions & Answers

passing command output from one command to the next command in cshell

HI Guys, I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that 1) I need to enter these commands $ echo $DISPLAY $ setenv $DISPLAY output_of_echo_$display_command How can i write a... (2 Replies)
Discussion started by: kaaliakahn
2 Replies

4. UNIX for Advanced & Expert Users

unix command : how to insert text at the cursor location via command line?

Hi, Well my title isn't very clear I think. So to understand my goal: I have a script "test1" #!/bin/bash xvkbd -text blabla with xbindkeys, I bind F5 key in order it runs my test1 script So when I press F5, test1 runs. I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by:
0 Replies

5. IP Networking

ddns-rev-domainname being created wrong.

Greetings all, I have been battling with this problem for some time now, and I am not sure if I am just not seeing the obvious anymore or have made a stupid mistake, but I just can seem to get the reverse address in my network to run the right way. Short description of my network: I have a... (3 Replies)
Discussion started by: Adesso
3 Replies

6. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi "" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

7. AIX

AIX:Command to get netaddress/subnet address command in IPv4/IP6

AIX:Command to get netaddress/subnet address command in IPv4/IP6 Can anybody help us with a command to retrieve netaddress/subnet address command in IPv4/IP6 on aix machine. net/subnet address is in the format all 255 machines in an IPv4 network) (2 Replies)
Discussion started by: rookie8278
2 Replies

8. SuSE

inconsistent ls command display at the command prompt & running as a cron job

Sir, I using the following commands in a file (part of a bigger script): #!/bin/bash cd /opt/oracle/bin ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out If I run this from the command prompt the result is: 2007-05-16 if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies

9. UNIX for Dummies Questions & Answers

domainname dnsdomainname....etc ??

is there a variable that controls whether the settings of the domainname and dnsdomainame, nisdomaname and hostname are global or local (as in static).. i keep setting the values for these commands and after a while they disappear. how can I keep one static value that will remain even after I have... (7 Replies)
Discussion started by: moxxx68
7 Replies

10. UNIX for Dummies Questions & Answers

question about domainname

I'm kindda confused about domainname and /etc/defaultdomain. If I type domainname, will this be added to /etc/defaultdomain or do I need to add manually on /etc/defaultdomain as well?...second question, if I type domainname it case sensitive? Thank you. (1 Reply)
Discussion started by: dookeobih
1 Replies

Featured Tech Videos