Difference between revisions of "Help talk:Reading"

From ArchWiki
Jump to: navigation, search
(Revision criteria: rm old discussion)
(sudo basics: new section)
Line 31: Line 31:
  
 
::I.e., this article is about interpreting the wiki (but will ''not'' include sections that belong in other articles). The new to GNU/Linux introduction part is a bit misleading.
 
::I.e., this article is about interpreting the wiki (but will ''not'' include sections that belong in other articles). The new to GNU/Linux introduction part is a bit misleading.
 +
 +
== sudo basics ==
 +
 +
[https://wiki.archlinux.org/index.php?title=WPA_supplicant&diff=next&oldid=302493 These] [https://wiki.archlinux.org/index.php?title=WPA_supplicant&diff=next&oldid=302557 two] edits made me realize that there is currently no justification to revert them (other than "who installed {{Pkg|sudo}} (it is not included in {{Grp|base}}) should know of its quirks with input/output redirection").
 +
 +
The interpretation of [[Help:Reading#Regular_user_or_root]] should be that commands prefixed with {{ic|#}} should be run from ''real root shell'', not just substitute {{ic|#}} with {{ic|sudo}}. Of course it works in 99% cases, but even the remaining 1% is too big to provide the necessary information every time such case occurs. It should be described on this page and every other page should assume that commands prefixed with {{ic|#}} are executed from a root shell. What do you think about the following note to be included in [[Help:Reading#Regular_user_or_root]]?
 +
 +
{{Note|The commands prefixed with {{ic|#}} should be executed from a ''root shell''. In most cases, running {{ic|sudo ''command''}} from an unprivileged shell instead of {{ic|''command''}} from a root shell. This approach uses [[sudo]] to temporarily gain root privileges for running the command, but it will not work with all commands — for example if the command involves [[Wikipedia:Redirection_(computing)|redirection]], you will have to execute it from a root shell. A quick way to get a root shell is to run {{ic|sudo -i}}.}}
 +
 +
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:13, 3 March 2014 (UTC)

Revision as of 21:13, 3 March 2014

Purpose

Besides covering basic differentiations, this article could serve to improve the quality of the Wiki by avoiding repetition. How many articles say: "edit in ~/.bashrc, or zhrc (if you're using zsh) -- alternatively, edit /etc/profile.bash for system-wide changes" or something to that effect? And even though it sounds counterintuitive, expanding this article makes the Wiki better for advanced users as well, since they won't be presented with the same old information they're accustomed to skip.

We could have a basic run down of common file locations and what they mean, instead of explaining them in every article. Editors can just say "add the following to the shell's configuration" and readers would then decide whether they want it system-wide or not, etc.

Just like article:ABS is referred to in every page that involves compiling, this page could serve the same kind of utility.

Merge Common Shell files

Section Help:Reading#Common shell files should be merged with Bash and Zsh. manolo 14:53, 13 November 2009 (EST)

I think that 'Common shell files' should be in their respected pages. And remove any mention of common files. Is it not the purpose of this page to make the wiki in general easier to read and remove repetition? M l 16:42, 13 November 2009 (EST)
Yes, but the common files section is specific to Bash and Zsh. Repetition would still be avoided, articles could be:
Add to Bash files:
      # This alias makes ls colorize the listing
      alias ls='ls --color=auto'
Instead of what we have now:
Add the following using nano, or vim to ~/.bashrc for personal settings, or /etc/bash.bashrc for system-wide changes:
      # This alias makes ls colorize the listing
      alias ls='ls --color=auto'
Don't forget to source the file in order to blahblah:
      $ source /etc/bash.bashrc
Tip: 'source' can be abbreviated with '.' (a dot).
Strictly speaking, $ and # differentiation is also specific to Bash, but for the sake of consistency every article should be using Bash-style denotation instead of "run as root" or "if using zsh, the root prompt will look different" etc. etc., so that excerpt belongs here. The same reasons apply with editing and sourcing. Although I do see why somebody else would argue that it also belongs in Bash.
And the last section leads to other repetitive tasks that should not be repeated in every article. This is temporary, and once all editors conform to not including pacman and rc.conf tutorials in their docs, it'll be removed.
I.e., this article is about interpreting the wiki (but will not include sections that belong in other articles). The new to GNU/Linux introduction part is a bit misleading.

sudo basics

These two edits made me realize that there is currently no justification to revert them (other than "who installed sudo (it is not included in base) should know of its quirks with input/output redirection").

The interpretation of Help:Reading#Regular_user_or_root should be that commands prefixed with # should be run from real root shell, not just substitute # with sudo. Of course it works in 99% cases, but even the remaining 1% is too big to provide the necessary information every time such case occurs. It should be described on this page and every other page should assume that commands prefixed with # are executed from a root shell. What do you think about the following note to be included in Help:Reading#Regular_user_or_root?

Note: The commands prefixed with # should be executed from a root shell. In most cases, running sudo command from an unprivileged shell instead of command from a root shell. This approach uses sudo to temporarily gain root privileges for running the command, but it will not work with all commands — for example if the command involves redirection, you will have to execute it from a root shell. A quick way to get a root shell is to run sudo -i.

-- Lahwaacz (talk) 21:13, 3 March 2014 (UTC)