LinuxAdmin

Linux Admin

Books

User / Group

  • Add New Users

$ sudo groupadd -g 4000 caltech
# ====================================
# -g GID


$ sudo usermod -a -G caltech feynman
$ sudo usermod -a -G sudo feynman
# ====================================
# -a Append to group
# -G <Groups name>


$ sudo useradd -m feynman
$ sudo useradd -u 3999 -g 4000 -m -c "R. Feynman" -s /usr/bin/bash feynman
# ====================================
# -m Create /home/feynman
# -u UID
# -g GID
# -c Comment (Displayed Name on UI)
# -s Default Shell

# list member in caltech
$ grep caltech /etc/group


# change defalut group
$ usermod -g mit feynman

Network

Nvidia

  • Ubuntu

# Disable Secure Boot!

# List proper drivers
$ ubuntu-drivers devices

# Choose one method
1. $ sudo ubuntu-drivers autoinstall
2. $ sudo apt install nvidia-driver-440

# Reboot
$ sudo reboot

# Check devices and cuda driver
$ nvidia-smi

# Install cuda-toolkit
$ sudo apt update
$ sudo apt install nvidia-cuda-toolkit

# Check nvcc
$ nvcc --version

Disk / Partition

ZFS

NAS

  • AFP

    • netatalk

$ sudo apt install netatalk
$ sudo systemctl restart netatalk.service
==========================================
# /etc/netatalk/afp.conf
[myafp]
path = /zfs_pool/myafp valid users = cory

    • avahi

$ sudo apt install avahi-deamon
$ sudo systemctl restart avahi-daemon.service

==========================================
# /etc/avahi/services/afpd.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
==========================================

  • NFS

  • SMB