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
-
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.
+
#### 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 and example username with the name of the user you want to add.
> sudo usermod -a -G examplegroup exampleusername
For example, to add the user geek to the group sudo , use the following command:
@@ 15,24 16,23 @@
> sudo gpasswd -d user group
Change user
-
su backups
+
> su backups
-
CHOWN
-
===========================
-
sudo chown -R syncthing:syncthing Muziek/
+
Voer een comando uit als een andere user
+
> sudo -u user commando
-
sudo chmod
+
#### Ownership
+
(recursive in folder)
+
> sudo chown -R syncthing:syncthing Muziek/
-
CHMOD
-
find /path/to/directory -type d -exec chmod 770 {} \;
-
find /path/to/directory -type f -exec chmod 660 {} \;
-
======================
-
sudo find Muziek/ -type d -exec chmod 770 {} \;
-
sudo find Muziek/ -type f -exec chmod 660 {} \;
+
#### Change permissions CHMOD
+
Alle folders naar 770
+
> sudo find Muziek/ -type d -exec chmod 770 {} \;
+
Alle bestanden naar 660
+
> sudo find Muziek/ -type f -exec chmod 660 {} \;
recursief verwijderen (niet lege) directories
-
-
rm -R /path-to-dir
+
>rm -R /path-to-dir
You can copy the content of a folder /source to another existing folder /dest with the command