snipt

Ctrl+h for KB shortcuts

Bash Session

Actualizar kernel en Ubuntu

1
2
3
4
5
6
7
8
#Mirar versión de kernel instalado.
uname -a
#Bajamos los paquetes necesarios correspondiente a la arquitectura de nuestro procesador.
http://kernel.ubuntu.com/~kernel-ppa/mainline
#Instalamos el nuevo kernel.
sudo dpkg -i linux*.deb
#Actualizamos el grub.
sudo update-grub
https://snipt.net/embed/9b5870776571bf6873c805471e2fae21/
https://snipt.net/raw/9b5870776571bf6873c805471e2fae21/
9b5870776571bf6873c805471e2fae21
console
Bash Session
8
2016-09-26T17:36:22
True
False
False
/api/public/snipt/128920/
actualizar-kernel-en-ubuntu
<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="gp">#</span>Mirar versión de kernel instalado. </span><span id="L-2"><a name="L-2"></a><span class="go">uname -a</span> </span><span id="L-3"><a name="L-3"></a><span class="gp">#</span>Bajamos los paquetes necesarios correspondiente a la arquitectura de nuestro procesador. </span><span id="L-4"><a name="L-4"></a><span class="go">http://kernel.ubuntu.com/~kernel-ppa/mainline</span> </span><span id="L-5"><a name="L-5"></a><span class="gp">#</span>Instalamos el nuevo kernel. </span><span id="L-6"><a name="L-6"></a><span class="go">sudo dpkg -i linux*.deb</span> </span><span id="L-7"><a name="L-7"></a><span class="gp">#</span>Actualizamos el grub. </span><span id="L-8"><a name="L-8"></a><span class="go">sudo update-grub</span> </span></pre></div> </td></tr></table>
kernel, linux, ubuntu

Text only

Actualizar / desisntalar kernel ubuntu

Actualizar http://bitelia.com/2013/10/actualizar-el-kernel-de-linux
Desinstalar http://hatteras.wordpress.com/2008/02/16/desinstalar-kernerl/
https://snipt.net/embed/18e0e0c0c31796d0edf0805518a779f1/
https://snipt.net/raw/18e0e0c0c31796d0edf0805518a779f1/
18e0e0c0c31796d0edf0805518a779f1
text
Text only
2
2016-09-22T02:56:30
True
False
False
/api/public/snipt/119569/
actualizar-kernel-ubuntu
<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>Actualizar http://bitelia.com/2013/10/actualizar-el-kernel-de-linux </span><span id="L-2"><a name="L-2"></a>Desinstalar http://hatteras.wordpress.com/2008/02/16/desinstalar-kernerl/ </span></pre></div> </td></tr></table>
Linux, kernel

Text only

extract initrd

gunzip < /boot/initrd.img | cpio -i --make-directories
https://snipt.net/embed/b7dc31e07b69627a0a259ce3a0c6feeb/
https://snipt.net/raw/b7dc31e07b69627a0a259ce3a0c6feeb/
b7dc31e07b69627a0a259ce3a0c6feeb
text
Text only
2
2016-09-27T00:57:17
True
False
False
/api/public/snipt/13274/
extract-initrd
<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>gunzip &lt; /boot/initrd.img | cpio -i --make-directories </span></pre></div> </td></tr></table>
extract, img, initrd, kernel

Bash

Load a module at system start-up

$> su
$> echo "<module>" >> /etc/modules
https://snipt.net/embed/6b013644b637035ace6ba9e58c98f6de/
https://snipt.net/raw/6b013644b637035ace6ba9e58c98f6de/
6b013644b637035ace6ba9e58c98f6de
bash
Bash
2
2016-09-18T12:08:27
True
False
False
/api/public/snipt/6374/
load-a-module-at-system-start-up
<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><span class="nv">$&gt;</span> su </span><span id="L-2"><a name="L-2"></a><span class="nv">$&gt;</span> <span class="nb">echo</span> <span class="s2">&quot;&lt;module&gt;&quot;</span> &gt;&gt; /etc/modules </span></pre></div> </td></tr></table>
kernel, linux

Bash

Measure use of memory from a program

$> valgrind -v <program> <arguments>
https://snipt.net/embed/5b9d771ed706564408b15a84f88606b9/
https://snipt.net/raw/5b9d771ed706564408b15a84f88606b9/
5b9d771ed706564408b15a84f88606b9
bash
Bash
1
2016-09-22T12:21:16
True
False
False
/api/public/snipt/6370/
measure-use-of-memory-from-a-program
<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><span class="nv">$&gt;</span> valgrind -v &lt;program&gt; &lt;arguments&gt; </span></pre></div> </td></tr></table>
kernel, linux, stat

Bash

Measure performance, time and calls from a program

1
2
3
$> callgrind -v <program> <arguments>
# this generate a file <program>.out.<pid>
$> kcachegrind <program>.out.<pid>
https://snipt.net/embed/0ea9d967d7b8f4137661f27d6586c9d4/
https://snipt.net/raw/0ea9d967d7b8f4137661f27d6586c9d4/
0ea9d967d7b8f4137661f27d6586c9d4
bash
Bash
4
2016-09-22T09:37:32
True
False
False
/api/public/snipt/6369/
measure-performance-time-and-calls-from-a-program
<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><span class="nv">$&gt;</span> callgrind -v &lt;program&gt; &lt;arguments&gt; </span><span id="L-2"><a name="L-2"></a><span class="c"># this generate a file &lt;program&gt;.out.&lt;pid&gt;</span> </span><span id="L-3"><a name="L-3"></a><span class="nv">$&gt;</span> kcachegrind &lt;program&gt;.out.&lt;pid&gt; </span></pre></div> </td></tr></table>
kernel, linux, stat

Bash

Recognize mouse devices

1
2
3
4
5
# ps/2 mouse
/dev/psaux

# usb mouse
/dev/input/mice
https://snipt.net/embed/0ba65130ca5c38f2bb37f1d5437c476a/
https://snipt.net/raw/0ba65130ca5c38f2bb37f1d5437c476a/
0ba65130ca5c38f2bb37f1d5437c476a
bash
Bash
5
2016-09-08T10:46:02
True
False
False
/api/public/snipt/6368/
recognize-mouse-devices
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c"># ps/2 mouse</span> </span><span id="L-2"><a name="L-2"></a>/dev/psaux </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c"># usb mouse</span> </span><span id="L-5"><a name="L-5"></a>/dev/input/mice </span></pre></div> </td></tr></table>
kernel, linux
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.