From Mageia wiki
Jump to: navigation, search


Drakconf multiflag.png
Other languages
Deutsch ; English ; español ; français ; português (Portugal) ; português brasileiro ;
This page is a template. It does not contain information about Mageia, but should be used to present other templates. Avoid experimenting with this template, as you may ruin all pages using this template.

If you want to create, modify and test a new template, edit the code on your personal page. When your work is up to your expectations, you can create the template page. You can also visit this page to create your local wiki. You are free to express your opinion about this template.

About this template

This template should be used when a command is entered as a standard user or as root.

  • The first argument displays the command line.
  • The second parameter allows you to specify the command prompt. By default, it is "$". To change this, prompt=# or more elaborate depending on your expectations, e.g., user@localhost:~$.
  • An error is generated in the template, when you use the "=" equals sign inappropriately for MediaWiki.

Syntax:

{{command|command line|prompt=# (option)}}

The message will look like this:

{{command|/usr/bin/sudo urpmi --auto-update}}

$ /usr/bin/sudo urpmi --auto-update

{{command|urpmi --auto-update|prompt=#}}

# urpmi --auto-update

{{command|echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/01wheel & chmod 440 /etc/sudoers.d/01wheel}}

$ ERROR : A downside of this template is that it does not work if the "=" (equal) or "|" (vertical bar) signs are included in the template. To insert them correctly, you must use the {{=}} and {{!}} syntax.

{{command|echo "%wheel ALL{{=}}(ALL) ALL" > /etc/sudoers.d/01wheel & chmod 440 /etc/sudoers.d/01wheel}}

# echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/01wheel & chmod 440 /etc/sudoers.d/01wheel