linux:linux-commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:linux-commands [2019/03/28 02:59] – 108.225.197.92linux:linux-commands [2019/11/07 14:58] (current) – 12.29.70.125
Line 90: Line 90:
  
 <code>sudo dhclient eno1</code> - Windows equivalent of dhcp release / renew <code>sudo dhclient eno1</code> - Windows equivalent of dhcp release / renew
 +
 +<code>sudo dhclient eno1 down</code>
 +<code>sudo dhclient eno1 up</code>
  
 ===== MySQL Commands ===== ===== MySQL Commands =====
Line 228: Line 231:
 <code>echo ''; sar -q -f /var/log/sa/sa01 | grep -E '[1-9]+[0-9]*[0-9]*\...' | awk -v fifteen=' 15 Minute Load Avg' '{print $1, $2, $7, fifteen}'; echo ''</code> - (Prints just the 15 minute load average) <code>echo ''; sar -q -f /var/log/sa/sa01 | grep -E '[1-9]+[0-9]*[0-9]*\...' | awk -v fifteen=' 15 Minute Load Avg' '{print $1, $2, $7, fifteen}'; echo ''</code> - (Prints just the 15 minute load average)
  
 +===== Date and time =====
 +[[https://www.howtogeek.com/410442/how-to-display-the-date-and-time-in-the-linux-terminal-and-use-it-in-bash-scripts/]]
  
 =====  Restart Services ===== =====  Restart Services =====
Line 436: Line 441:
 </code> </code>
 - for updating multiple git repos in the current folder - for updating multiple git repos in the current folder
 +
 +===== How to kill a process in linux =====
 +<code>ps aux</code>
 +- use this to list all of the current running processes
 +<code>ps aux | grep "chrome"</code>
 +- use this to search the processes for "chrome"
 +<code>
 +USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
 +root         1  0.0  0.0 193540  9780 ?        Ss   May16   3:24 /sbin/init splash
 +root         2  0.0  0.0      0     0 ?        S    May16   0:00 [kthreadd]
 +root         3  0.0  0.0      0     0 ?        I<   May16   0:00 [rcu_gp]
 +root         4  0.0  0.0      0     0 ?        I<   May16   0:00 [rcu_par_gp]
 +root         6  0.0  0.0      0     0 ?        I<   May16   0:00 [kworker/0:0H-kblockd]
 +</code>
 +- output looks like this
 +<code>kill -9 [pid]</code>
 +- use this to kill the process, the ''-9'' will kill all processes that it can kill, including the tree
 +
 +===== Linux Time =====
 +<code>
 +timedatectl set-local-rtc 1 --adjust-system-clock
 +timedatectl
 +timedatectl set-local-rtc 0 --adjust-system-clock
 +</code>
 +- use the first command to set linux to use local time, use the second command to check the settings for time, and use the third command to return it to default
  • linux/linux-commands.1553741997.txt.gz
  • Last modified: 2019/03/28 02:59
  • by 108.225.197.92