Ubuntu - danwu960/github-slideshow Wiki


#problem with wired Ethernet unmanaged #edit /etc/NetworkManager/NetworkManager.conf [main] plugins=ifupdown,keyfile

[ifupdown] managed=true

[keyfile] unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma,except:type:wwan,except:type:ethernet,except:type:vlan

[device] wifi.scan-rand-mac-address=no

#save the file, and run

  • sudo systemctl restart network-manager

#check the device status

  • sudo nmcli device status

#keep the computer from sleeping

  • sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

#Set the global environment by editing file /etc/environment, one environment per line, reload the file by running

  • source /etc/environment
  • echo $variable_name

#Local or user environment, Ubuntu page recommends editing ~/.profile; when bash is started as a login shell, Bash will prefer ~/.bash_profile; the third alternative is ~/.bashrc