Skip to content

Instantly share code, notes, and snippets.

@liangx8
Last active April 12, 2018 04:08
Show Gist options
  • Save liangx8/7364776 to your computer and use it in GitHub Desktop.
Save liangx8/7364776 to your computer and use it in GitHub Desktop.
Linux frequency command
list content of installed package
dpkg -L package-name
attach a file to first unused loop device
losetup -f file
detach loop
losetup -d /dev/loopX
copy a tree with source directory "/usr/*" to distance directory "/mnt/usr"
cd /usr
find -print0 | cpio --null -pd /mnt/usr
change netcard default name
cd /etc/udev/rules.d
vi 70-persistent-net.rules
# for archlinux
# start a systemd-networkd with this command(available at once)
systemctl start systemd-networkd
# enable a systemd-networkd serice (every startup linux box)
systemctl enable systemd-networkd.service
# resize tmpfs
mount -o remount,size=4G,noatime /tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment