# Comment out a line or leave it uncommented

**URL:** <https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493>\
**Category:** Linux lounge\
**Created:** [December 3, 2022, 4:40pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493 "2022-12-03T16:40:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoli62](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/z/4bbf92/32.png) [@zoli62](https://forum.endeavouros.com/u/zoli62)\
**Post date:** [December 3, 2022, 4:40pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/1 "2022-12-03T16:40:13Z")

</div>

Generally, if we comment out the lines containing certain settings in the configuration files of the commands, they will not be executed, and if we leave them uncommented, they will be executed. However, we see that certain lines containing the default settings are commented out. There is some contradiction here. How does the given command run with the default settings if the relevant lines of the configuration file are uncommented?

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [December 3, 2022, 4:43pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/2 "2022-12-03T16:43:51Z")

</div>

> [@zoli62](#):
>
> However, we see that certain lines with default settings are commented out. There is some contradiction here. How does the given command run with the default settings if those relevant lines of the configuration file are left uncommented?

It depends on the program in question but many applications apply the default settings programatically unless you override them in the config file. In these cases, it is common practice to add the defaults to the config file and leave them commented out.

When you are referencing a config file, the lines are often not executed but are simply being read. Even if they are being executed as with a script, they are often only overriding the defaults so if they are commented or omitted, the defaults are still applied.

---

<div class="post-metadata">

**Author:** ![zoli62](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/z/4bbf92/32.png) [@zoli62](https://forum.endeavouros.com/u/zoli62)\
**Post date:** [December 3, 2022, 4:55pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/3 "2022-12-03T16:55:09Z")

</div>

> [@dalto](#):
>
> It depends on the program in question but many applications apply the default settings programatically unless you override them in the config file. In these cases, it is common practice to add the defaults to the config file and leave them commented out.
> 
> When you are referencing a config file, the lines are often not executed but are simply being read. Even if they are being executed as with a script, they are often only overriding the defaults so if they are commented or omitted, the defaults are still applied.

This is understandable, I think the default settings are also commented out as a reminder to the user. However, if we write a line containing modified settings uncommented under such a line containing default settings, is it also possible that it will not be executed?

---

<div class="post-metadata">

**Author:** ![sradjoker](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/sradjoker/32/64224_2.png) [@sradjoker](https://forum.endeavouros.com/u/sradjoker)\
**Post date:** [December 3, 2022, 4:58pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/4 "2022-12-03T16:58:26Z")

</div>

if it is uncommted it will get read

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [December 3, 2022, 4:59pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/5 "2022-12-03T16:59:45Z")

</div>

> [@zoli62](#):
>
> However, if we write a line containing modified settings uncommented under such a line containing default settings, is it also possible that it will not be executed?

No, the settings in the config file should always override the defaults.

Commented lines are usually ignored. It doesn’t matter if the comment is a default setting or something else. Anything that is commented out, is ignored.

---

<div class="post-metadata">

**Author:** ![zoli62](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/z/4bbf92/32.png) [@zoli62](https://forum.endeavouros.com/u/zoli62)\
**Post date:** [December 3, 2022, 5:19pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/6 "2022-12-03T17:19:44Z")

</div>

Then I think that the threads about this all over the internet could be the result of misunderstandings or bad translations of the term commented out, because this could also mean removing the # sign from the beginning of such a line. In the first case, it would perhaps be more correct and understandable to use the expression leave commented for such setting lines, in the second case, uncommented is more understandable.  
Of course, I don’t want to study linguistics.

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [December 3, 2022, 5:21pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/7 "2022-12-03T17:21:00Z")

</div>

> [@zoli62](#):
>
> However, we see that certain lines containing the default settings are commented out. There is some contradiction here.

No contradiction.  
Many apps show the default values as commented out. That can also be considered as documenting the details. As others already said, commented stuff is not used, but the app does have the default values already in the app.

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [December 3, 2022, 5:23pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/8 "2022-12-03T17:23:26Z")

</div>

> [@zoli62](#):
>
> because this could also mean removing the # sign from the beginning of such a line.

“Commented out” should _never_ mean removing the `#` sign. It should always refer to adding the `#` or whatever indicates a comment in that particular file.

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [December 3, 2022, 5:28pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/9 "2022-12-03T17:28:05Z")

</div>

Term “commenting out” can be a language problem as well.  
Most computing terms come from the English language, and other languages may have different inherent structures how such “sayings” should be interpreted.

I agree that in my language term “commenting out” sounds slightly awkward, but it is a commonly used term in computing.  
It means something like " leaving something out of the equation by adding a comment mark" which essentially removes the marked line.

---

<div class="post-metadata">

**Author:** ![zoli62](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/z/4bbf92/32.png) [@zoli62](https://forum.endeavouros.com/u/zoli62)\
**Post date:** [December 3, 2022, 5:28pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/10 "2022-12-03T17:28:18Z")

</div>

> [@manuel](#):
>
> No contradiction.  
> Many apps show the default values as commented out. That can also be considered as documenting the details. As others already said, commented stuff is not used, but the app does have the default values already in the app

All this came to mind only from the reflector-simple.conf file.  
In fact, if we uncomment the commented out lines containing the default settings, no changes will occur, because then the default settings are overwritten with the same settings.

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [December 3, 2022, 5:30pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/11 "2022-12-03T17:30:01Z")

</div>

> [@zoli62](#):
>
> reflector-simple.conf

Yeah, some EOS apps do not comment out the default values.  
In this respect you are right, they _should_ consistently follow the same principles.

---

<div class="post-metadata">

**Author:** ![zoli62](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/z/4bbf92/32.png) [@zoli62](https://forum.endeavouros.com/u/zoli62)\
**Post date:** [December 3, 2022, 5:36pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/12 "2022-12-03T17:36:05Z")

</div>

> [@manuel](#):
>
> Yeah, some EOS apps do not comment out the default values.  
> In this respect you are right, they _should_ consistently follow the same principles

Yes, I dared to write about this because there is no uniform practice in this matter. Unfortunately, it is a professional disadvantage for me that I look for logic in everything. 🙂

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [December 5, 2022, 2:29pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/13 "2022-12-05T14:29:45Z")

</div>

> [@zoli62](#):
>
> However, we see that certain lines containing the default settings are commented out. There is some contradiction here

There are no contradictions here. Those lines are merely a manifestation of the function of comments—to communicate intent to readers of code.

In this case, the comments are there to let the readers know what the default settings are and sometimes to let the user know what settings/options are available for configuration.

> [@zoli62](#):
>
> How does the given command run with the default settings if the relevant lines of the configuration file are uncommented?

Because those settings are already built into the program. The comment is only there to let the reader of the configuration file know what the default value(s) of that particular setting is(are). Even if a user **does** choose to uncomment the setting, it won’t be a problem. From the application’s point of view, it will just be like setting the same value twice. Consider this code snippet:

```c
int y = 99;
y = 99;

```

No compiler/interpreter will ever find fault in this kind of code. Setting the same value twice usually won’t result in errors.

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [December 5, 2022, 2:50pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/14 "2022-12-05T14:50:42Z")

</div>

> [@manuel](#):
>
> I agree that in my language term “commenting out” sounds slightly awkward,

@zoli62

One could easily understand the ‘etymology’ of that phrasal verb when one compares it with other phrasal verbs that are commonly in use.

1. take (verb) + out = remove something from a container/source ; changing an object’s spatial location in such a way that it goes from physically being inside another object to being physically outside of it
2. black + out = to go from a state of being conscious to the state of being unconscious; to exit or leave the state of consciousness;
3. wipe + out = to eliminate an object or a set of objects from existence; to take something from a state of existence to a state of non-existence

You can see a pattern here. In all three cases, there is a verb (take/wipe) that removes an object from a particular state, an act that can be conceptualized by the word “out” (because “out” conceptualize the notion of “leaving”).

The phrasal verb “comment out,” therefore, refers to the act of creating comments in the source code that brings a line of code from a state of being recognized by the program to a state of **not** being recognized by the program.

When you “comment out” a line of code, you are essentially using a comment to remove that line of code from the set of all lines to be executed by the compiler/program/interpreter. Therefore, the phrase makes sense.

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [December 5, 2022, 3:08pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/15 "2022-12-05T15:08:38Z")

</div>

> [@zoli62](#):
>
> Of course, I don’t want to study linguistics.

Seems your getting a lesson anyway. 🤣

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [December 5, 2022, 3:22pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/16 "2022-12-05T15:22:13Z")

</div>

@ricklinux

LOL. I am by no means a linguist. The semantics of “comment out” does seem fairly obvious to me, so I thought I’d give the OP my two cents.

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [December 5, 2022, 3:32pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/17 "2022-12-05T15:32:07Z")

</div>

It’s kind of funny because you are using some sophisticated verbiage that made me laugh. 🙂

Edit: The commented or uncommented or commented out terms may be difficult for some to understand. Especially if the user is not a native English speaker in my opinion. Sometimes i have to do a double take when i read it to make sure i understand. Also you have arch wiki that uses # to signify use of sudo and some people might see it and not understand.

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [December 5, 2022, 3:34pm UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/18 "2022-12-05T15:34:12Z")

</div>

It was deliberate. 😂

---

<div class="post-metadata">

**Author:** ![zoli62](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/z/4bbf92/32.png) [@zoli62](https://forum.endeavouros.com/u/zoli62)\
**Post date:** [December 6, 2022, 8:43am UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/19 "2022-12-06T08:43:26Z")

</div>

> [@anthony93](#):
>
> You can see a pattern here. In all three cases, there is a verb (take/wipe) that removes an object from a particular state, an act that can be conceptualized by the word “out” (because “out” conceptualize the notion of “leaving”).
> 
> The phrasal verb “comment out,” therefore, refers to the act of creating comments in the source code that brings a line of code from a state of being recognized by the program to a state of **not** being recognized by the program.
> 
> When you “comment out” a line of code, you are essentially using a comment to remove that line of code from the set of all lines to be executed by the compiler/program/interpreter. Therefore, the phrase makes sense.

For me, instead of commenting out, the following would be more understandable and sophisticated: mark the beginning of the program lines in question, which should not be executed, with the comment sign (e.g. # for bash)

---

<div class="post-metadata">

**Author:** ![zoli62](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/z/4bbf92/32.png) [@zoli62](https://forum.endeavouros.com/u/zoli62)\
**Post date:** [December 6, 2022, 9:20am UTC](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493/20 "2022-12-06T09:20:38Z")

</div>

> [@ricklinux](#):
>
> Especially if the user is not a native English speaker in my opinion. Sometimes i have to do a double take when i read it to make sure i understand. Also you have arch wiki that uses # to signify use of sudo and some people might see it and not understand.

Even you find it difficult to understand what the poet was thinking when reading something? (sorry writer) 🙂 By the way, do you live in an English- or French-speaking area? After my mother tongue, I learned German from an early age, and only then did English follow. After German, I thought that English was much easier, which is the case in many cases. But it turns out that this is not always the case.

[Next page](https://forum.endeavouros.com/t/comment-out-a-line-or-leave-it-uncommented/34493.md?page=2)
