Ubuntu Pastebin

Paste from Oer at Fri, 29 Jul 2016 23:06:30 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
hostnamectl status



sudo journalctl 

systemd-analyze blame
q
systemd --version

systemd-analyze plot > filename.svg

Commands:
  time                    Print time spent in the kernel
  blame                   Print list of running units ordered by time to init
  critical-chain          Print a tree of the time critical chain of units
  plot                    Output SVG graphic showing service initialization
  dot                     Output dependency graph in dot(1) format
  set-log-level LEVEL     Set logging threshold for systemd
  dump                    Output state serialization of service manager
  verify FILE...          Check unit files for correctness

systemctl --state=failed

journalctl -b -0 shows messages from the current boot, 
journalctl -b -1 from the previous boot

------------------------

systemctl start name.service
systemctl stop name.service
systemctl restart name.service
systemctl reload name.service
systemctl status name.service

------------------------------------
all available: 
systemctl list-unit-files

To list all running units:
systemctl list-units

To list all failed units:
systemctl –failed

----------------------------------------------

drivers

sudo ubuntu-drivers list

sudo ubuntu-drivers autoinstall 

sudo ubuntu-drivers devices


00000000000000000000000000000000000000000000000000000

what DM > dpkg -l | awk '$2 ~ /dm$/'

driver in use >> lspci -nnk | grep -i vga -A3 | grep 'in use'


------------------------------------------------------
remove old kernels 

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

tip for quickly identifying a PCI Wifi device: "lspci -nn -d ::280" (it matches on the device class - 0x0280)

-------------------------------------------------------------------------------------------------------------------
wifi 
rfkill list all
blacklist acer_wmi

Bluetooth 

uname -a; lspci -nnk | grep -iA2 net; lsusb; dmesg | grep -i bluetooth; dmesg | grep -i firmware; lsmod | grep bluetooth; rfkill list all

--------------------------------------------
check trim enabled

 tail -n1 /etc/cron.weekly/fstrim 


--------------------------------------------------


format ext hdd / sdcard

sudo usermod -G disk --append <USER>
Download as text