Last active
January 5, 2022 22:55
-
-
Save qodeninja/197849fa036bdf8edaf24d1aae65aebb to your computer and use it in GitHub Desktop.
Bash/Unix commands I always forget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# where C is the name or path, N is an integer | |
#check packages installed on ubuntu/debian | |
dpkg -l | grep NAME | |
#check mount meta | |
df -h PATH #or lsblk | |
#change mount options | |
id -u | |
sudo /etc/fstab | |
#get change owner | |
chown user:group | |
#get group info | |
tail /etc/group | |
groups USER #user | |
#change group info | |
groupmod -g N GROUP | |
usermod -a -G GROUP USER | |
#add smb user | |
sudo useradd -M -d /data/shared/USER -s /usr/sbin/nologin -G sambashare USER | |
sudo mkdir /data/shared/USER | |
sudo chown USER:sambashare /data/shared/USER | |
sudo chmod 2770 /data/shared/USER | |
#linux partition recommendations | |
#last update 2022 | |
#/(root) remaining | |
#/boot 1Gb | |
#/usr maybe 15gb | |
#/var 2 GB | |
#/home * | |
#/tmp not needed | |
#swap = RAM under 2gb - 16gb | |
#ref https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/s2-diskpartrecommend-x86 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment