Commit a8480c

2026-03-21 18:49:11 joris: editing
linux commands.md ..
@@ 1,19 1,18 @@
# Linux commands
- Add a New Group
- If you want to create a new group on your system, use the groupadd command following command, replacing new_group with the name of the group you want to create. You’ll need to use sudo with this command as well (or, on Linux distributions that don’t use sudo, you’ll need to run the su command on its own to gain elevated permissions before running the command).
- sudo groupadd mynewgroup
+ # Create a New Group
+ If you want to create a new group on your system, use the groupadd command following command, replacing new_group with the name of the group you want to create.
+ > sudo groupadd mynewgroup
- Add an Existing User Account to a Group
+ # Add an Existing User Account to a Group
To add an existing user account to a group on your system, use the usermod command, replacing examplegroup with the name of the group you want to add the user to andexampleusername with the name of the user you want to add.
- sudo usermod -a -G examplegroup exampleusername
+ > sudo usermod -a -G examplegroup exampleusername
+
For example, to add the user geek to the group sudo , use the following command:
- sudo usermod -a -G sudo geek
+ > sudo usermod -a -G sudo geek
remove a user from a group
-
- sudo gpasswd -d user group
-
+ > sudo gpasswd -d user group
Change user
su backups
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9