snipt

Ctrl+h for KB shortcuts

Text only

Force reboot when "reboot" command does not work ubuntu 8.04LTS

sudo su
echo b > /proc/sysrq-trigger
https://snipt.net/embed/dc9aba8fc4bbb2b14c658b143eee426f/
https://snipt.net/raw/dc9aba8fc4bbb2b14c658b143eee426f/
dc9aba8fc4bbb2b14c658b143eee426f
text
Text only
2
2016-09-24T08:03:52
True
False
False
Jan 28, 2013 at 05:28 PM
/api/public/snipt/54674/
force-reboot-when-reboot-command-does-not-work-ubuntu-804lts
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>sudo su </span><span id="L-2"><a name="L-2"></a>echo b &gt; /proc/sysrq-trigger </span></pre></div> </td></tr></table>
"ubuntu reboot", reboot

Bash

reboot time

1
2
3
4
5
6
7
8
# last reboot times
last reboot | head -10

# or
who -b

# login times
last -x | head -10
https://snipt.net/embed/ccd21fe2c3c4e63c3e781a9afb7be4eb/
https://snipt.net/raw/ccd21fe2c3c4e63c3e781a9afb7be4eb/
ccd21fe2c3c4e63c3e781a9afb7be4eb
bash
Bash
8
2016-09-22T15:23:58
True
False
False
/api/public/snipt/23855/
reboot-time
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c"># last reboot times</span> </span><span id="L-2"><a name="L-2"></a>last reboot <span class="p">|</span> head -10 </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c"># or</span> </span><span id="L-5"><a name="L-5"></a>who -b </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="c"># login times</span> </span><span id="L-8"><a name="L-8"></a>last -x <span class="p">|</span> head -10 </span></pre></div> </td></tr></table>
login, reboot

Bash

ubuntu - apagar o reiniciar via terminal

1
2
3
4
5
6
7
# apagar linux
sudo poweroff
# o
sudo shutdown 0

# reiniciar
sudo shutdown -r
https://snipt.net/embed/c87d3e0c2dd35bb440556b50c0677cdb/
https://snipt.net/raw/c87d3e0c2dd35bb440556b50c0677cdb/
c87d3e0c2dd35bb440556b50c0677cdb
bash
Bash
7
2016-09-25T22:01:17
True
False
False
/api/public/snipt/16613/
ubuntu-apagar-o-reiniciar-via-terminal-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c"># apagar linux</span> </span><span id="L-2"><a name="L-2"></a>sudo poweroff </span><span id="L-3"><a name="L-3"></a><span class="c"># o</span> </span><span id="L-4"><a name="L-4"></a>sudo shutdown 0 </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a><span class="c"># reiniciar</span> </span><span id="L-7"><a name="L-7"></a>sudo shutdown -r </span></pre></div> </td></tr></table>
reboot, shutdown, terminal, ubuntu

Bash

Change Linux hostname without reboot

1
2
3
vim /etc/hostname
vim /etc/hosts
hostname new-hostname
https://snipt.net/embed/b4d8178ec8afc5351a2dd41a01b06cd7/
https://snipt.net/raw/b4d8178ec8afc5351a2dd41a01b06cd7/
b4d8178ec8afc5351a2dd41a01b06cd7
bash
Bash
4
2016-09-28T01:53:04
True
False
False
/api/public/snipt/6656/
change-linux-hostname-without-reboot-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>vim /etc/hostname </span><span id="L-2"><a name="L-2"></a>vim /etc/hosts </span><span id="L-3"><a name="L-3"></a>hostname new-hostname </span></pre></div> </td></tr></table>
hostname, reboot

Text only

Reboot linux system when it hungs at all

ALT+PETSIS+b
https://snipt.net/embed/13fd1bad06be0a71bf871d141d0730ef/
https://snipt.net/raw/13fd1bad06be0a71bf871d141d0730ef/
13fd1bad06be0a71bf871d141d0730ef
text
Text only
1
2016-09-18T01:04:49
True
False
False
/api/public/snipt/6352/
how-to-reboot-linux-system-when-it-hungs-at-all
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>ALT+PETSIS+b </span></pre></div> </td></tr></table>
linux, reboot

Bash

Display last reboot

last reboot | head -1
https://snipt.net/embed/15759d7105da572b208ff77e44017558/
https://snipt.net/raw/15759d7105da572b208ff77e44017558/
15759d7105da572b208ff77e44017558
bash
Bash
1
2016-09-14T15:19:51
True
False
False
/api/public/snipt/5175/
display-last-reboot
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>last reboot <span class="p">|</span> head -1 </span></pre></div> </td></tr></table>
reboot
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.