What Is G in Linux?
Contents

-G sets the supplementary, or additional, groups. These are the groups in /etc/group that list your user account. This might include groups such as sudo , staff , etc.

What does G mean in Linux?

g tells sed to “globally” substitute (change everything that matches the pattern on each line, rather than only the first on a given line). … For instance, if it contained a space or tab, that would break the substitution parameter passed by the shell to sed into two parts (an error).

What is G in SED?

sed ‘s/regexp/replacement/g’ inputFileName > outputFileName. In some versions of sed, the expression must be preceded by -e to indicate that an expression follows. The s stands for substitute, while the g stands for global, which means that all matching occurrences in the line would be replaced.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest