New users of Ask Ubuntu often post outputs of commands in comments (mostly without formatting it as code) when other users ask them for the output of commands.

The code needs to be in the question and it is tough for a normal user to copy the code and format it as code (with proper spacing), especially if it is multi-line code, and add it in the question.

In these kinda situations, what should a user do:

  1. Try their best to format the code properly with the risk of messing the spacing up?

  2. Ignore it and leave the code in the comment?

  3. Flag the comment as:

    Something else.
    A problem not listed above. Try to be as specific as possible.

    and notify moderators as they can "edit ... any comment at any time"?

2 Answers 2


First, have a look to see if the material from the comments has already been added to the post by an edit. If it has, you can flag the comments as no longer needed.

Small single line pieces of code can be edited into the post by you. If you need to suggest an edit, you can put in the edit summary something like "added information given by OP in the comments" to make it more obvious to reviewers that the edit is justified.

If the comments appear to contain multiline code or, more likely, command output, I approve of flagging them for Something else... because mods have an editor for comments which makes it possible to retrieve the original line breaks. At times it can be very difficult to work out where the line breaks were, and in any case it is relatively laborious to insert them, while for mods it's just a matter of click, copy, click, paste.

Of course, other mods may dislike the prospect of editing text from comments into a post and decline your flag. If you are worried about your flags getting declined, please feel free to ping me in chat and ask me to edit multiline code from comments into posts.


Just edit the comment into the question yourself. If you don't have enough reputation to edit, just suggest an edit and explain that you are copying information from the comments.

Moderators don't have any better tools than you do, so it is just as hard for them as it is for us. Yes, mods can edit comments, but here the idea is to add the comment to the question and in any case, markdown is very limited in comments.

In general, you should avoid calling in the moderators for things you can do yourself since that just creates work for the mods. In addition, the more work done by the community the better since we don't want a site that is "controlled" by a few moderators. These are collaborative sites, after all, and editing is an integral part of it.

So, either edit the comment into the post or, if you don't have the time, leave it. But I would argue you should not flag it for mod attention since it isn't something that requires a moderator or even something that a moderator could do better or more easily than any other user.

  • 3
  • 2
    @RandomPerson yes, OK. Specifically for line breaks, that might make sense. And if a local mod told you she wants flags, then on her head be it! :)
    – terdon
    Commented May 25, 2021 at 14:05
  • 1
    There have been instances when I have flagged comments for multi-line code by choosing "Something else. A problem not listed above. Try to be as specific as possible." and since Zanna supports these kinda flags, I specifically mention Zanna's name while flagging such that Zanna can intervene, but still some flags get declined. I think some other mod must have declined the flags. Commented May 25, 2021 at 14:10
  • 6
    @RandomPerson I think a good rule of thumb would be to only flag such comments if they are multi-line code since that is the only case where mods have any advantage. Then, when you flag such comments, explicitly mention that you are flagging because it is multi-line code, so you cannot easily add it to the question. Otherwise, it might look like you are asking the mods to do something you can do just as well yourself, and that could make them decline the flag.
    – terdon
    Commented May 25, 2021 at 14:17
  • I only flag comments if they are multi-line code. But I might not have mentioned that the code is multi-line while flagging. My bad. Commented May 25, 2021 at 14:27
  • 3
    @RandomPerson oh, it's nobody's "bad"! You're taking the time to ask here and are obviously doing your best to be helpful, that can only be good! Just remember that this site generates several dozen flags every day, and moderators are human. They usually don't have time to look into a flag in great detail, so the more information you give them, the easier it is for them to understand.
    – terdon
    Commented May 25, 2021 at 14:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .