Linux tips

Mounting a remote NFS directory

# Arch
pacman -S nfs-utils
# Ubuntu
apt install nfs-common

Get to know what IP addresses are allowed to use the NFS On the NFS client:

$ showmount -e birch.ttic.edu
Export list for birch.ttic.edu:
/ripl xxx.xxx.xxx.176/28

/28 is the subnet mask that corresponds to 255.255.255.240. (This value is the number of 1s counted from the left; subnet mask cheat sheet) This means there are 15 IP addresses (176 to 191) allowed to access the NFS.

You can edit /etc/fstab in the NFS client machine by adding:

birch.ttic.edu:/ripl/data /ripl/data nfs defaults 0 0
birch.ttic.edu:/ripl/user /ripl/user nfs defaults 0 0

Then don't forget to reload the mount

sudo mount -a

Resources

Annoying issues

sudo rejects my correct password!!

# Check if systemd-homed is running
systemctl status systemd-homed
# If not, start it
su root  # Log in as root
systemctl start systemd-homed

In some other occasions, (re?)installing pambase fixes this.

pacman -S pambase

Cute tips

  • Limit the number of files to show in tree
    tree --filelimit N