Skip to content

Instantly share code, notes, and snippets.

@franaudo
Last active May 2, 2020 18:16
Show Gist options
  • Save franaudo/e84050f21a96f0066d5c7fab6128162a to your computer and use it in GitHub Desktop.
Save franaudo/e84050f21a96f0066d5c7fab6128162a to your computer and use it in GitHub Desktop.

Useful simple commands

  • Repeat last command as sudo: sudo !!
  • Check wifi strength: watch -n1 iwconfig
  • Change keyboar mapping: sudo dpkg-reconfigure keyboard-configuration
  • instal Exchange Web Server for Evolution: sudo apt-get install evolution-ews
  • share folder over network: python3 -m http.server (use ifconfig to find the IP address)
  • minimize windows with taskbar icon: gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'

Nvidia graphic card an dual monitor

Open the file in your favorite editor (vim, nano, gedit, etc.).

sudo nano /lib/modprobe.d/nvidia-kms.conf

And comment out the the nvidia-drm modeset option.

# This file was generated by nvidia-prime
# Set value to 0 to disable modesetting
# options nvidia-drm modeset=1

Create Bootable usb stick

fdisk -l
sudo dd bs=4M if=./manjaro-gnome-18.1.5-minimal-191229-linux54.iso of=/dev/sdb status=progress & sync
sudo wipefs --all /dev/sdX # if you want to wipe out the usb drive

Enable write cache

sudo hdparm -i /dev/sda #to check if the cache writing is enabled
sudo gedit /etc/hdparm.conf

Comment the line “#write_cache = off” (without quotes) by removing the # at its beginning. So it looks like:

    -W Disable/enable the IDE drive’s write-caching feature write_cache = off

Swap

check swappiness

cat /proc/sys/vm/swappiness

change swappiness

gedit admin:///etc/sysctl.conf
add the following line:
    vm.swappiness = 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment