LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-26-2011, 08:56 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Rep: Reputation: 34
Meaing of the '$' in a command.


I have the following command which I think must be changed.

Is the $ a variable and should I change it to my names?

mydestination = $myhostname localhost.$mydomain localhost $mydomain

Should $myhostname be changed something like my host name such as

mydestination = $spacewalker localhost.$spacewalker localhost $spacewalker

If the $ is a variable should I leave it off?

Thanks
 
Old 08-26-2011, 09:29 PM   #2
bentbrewer
LQ Newbie
 
Registered: May 2011
Location: In a brewery
Distribution: Ubuntu 18.04, RHEL
Posts: 21

Rep: Reputation: Disabled
It may be indicating a variable, but I think the entire word would be indicating a variable.

$myhostname = spacewalker
$mydomain = local

Unless you are on a domain...

Last edited by bentbrewer; 08-26-2011 at 09:35 PM. Reason: I'm an idiot.
 
Old 08-26-2011, 09:40 PM   #3
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
Quote:
Originally Posted by swamprat View Post
I have the following command which I think must be changed.

Is the $ a variable and should I change it to my names?

mydestination = $myhostname localhost.$mydomain localhost $mydomain

Should $myhostname be changed something like my host name such as

mydestination = $spacewalker localhost.$spacewalker localhost $spacewalker

If the $ is a variable should I leave it off?

Thanks

It would be nice if you gave people some context - where did
you dig these lines up? Is it code, is it a config file?
What is its purpose?


Cheers,
Tink
 
Old 08-26-2011, 11:43 PM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
I would also add that looking at the example so far there are no commands at all. What I see is a variable being set to a value, but as Tink says, for what
we have no idea without context.
 
Old 08-27-2011, 12:18 PM   #5
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Original Poster
Rep: Reputation: 34
Sorry about that, I remember getting it from the main.cf file in Postfix
 
Old 08-27-2011, 05:03 PM   #6
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 116

Rep: Reputation: 7
Yes, it is from the main.cf config file in Postfix. The file "... specifies a very small subset of all the parameters that control the operation of the Postfix mail system ..."

If you do a Google search for the entire string "mydestination = $myhostname localhost.$mydomain localhost $mydomain" then you'll see numerous Postfix-related sites which deal with it in one way or the other.

A good start would be at the following Postfix page:

www.postfix.org/BASIC_CONFIGURATION_README.html

Last edited by cheddarcheese; 08-28-2011 at 06:23 AM.
 
Old 08-28-2011, 04:38 AM   #7
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,465
Blog Entries: 6

Rep: Reputation: 200Reputation: 200Reputation: 200
Hello, i'm not entirely sure what you mean, but i'm just gonna throw this out there. if you're talking about the dollar sign after your users name, that just indicates you're signed as a user. as root it will no longer display a dollar sign but instead a hash, "#".
 
0 members found this post helpful.
Old 08-28-2011, 06:09 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by Knightron View Post
Hello, i'm not entirely sure what you mean, but i'm just gonna throw this out there. if you're talking about the dollar sign after your users name, that just indicates you're signed as a user. as root it will no longer display a dollar sign but instead a hash, "#".
Fist of all, that's clearly not what the OP is talking about, and second, very few shell prompts (I think thais is what you're talking about) I've seen consist of the username followed by a "$".
 
Old 08-28-2011, 04:40 PM   #9
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,465
Blog Entries: 6

Rep: Reputation: 200Reputation: 200Reputation: 200
hey calm down, if im talking about the wrong thing then the op can just ignore my post, no halm done. as for the shell, ive only used bash, so i'm not aware of how others display.
 
Old 08-28-2011, 05:07 PM   #10
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by Knightron View Post
as for the shell, ive only used bash, so i'm not aware of how others display.
bash can be made to use any prompt. AFAIK the default one looks like this:

Code:
bash-X.X$
, where "X.X" is the version number. But most distros make it like this by default:

Code:
username@hostname:current-dir$
.
 
Old 08-30-2011, 02:07 PM   #11
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Original Poster
Rep: Reputation: 34
mydestination = $myhostname localhost.$mydomain localhost $mydomain

So, I'm really sorry but a simple straight for answer would really help and I know you all have been trying:

Do for the example above is the $myhostname variable change to my name such as $spacewalker???

BTW, I'm on the U.S. East Coast and couldn't answer before because of electrice outages.
 
Old 08-30-2011, 02:32 PM   #12
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 116

Rep: Reputation: 7
I really think you'd find more help at a site dealing with Postfix issues, such as the one I suggested a day or two back. It is a Postfix file, and you're asking about Postfix configuration.
 
  


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
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 11:21 AM
how to copy drive using dd and tee command parallely? source code of dd command mdfakkeer Linux - Software 1 02-10-2010 01:31 PM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 02:14 AM
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM

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

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