snipt

Ctrl+h for KB shortcuts

Bash

change hostname

sudo /bin/hostname mynewhostname
https://snipt.net/embed/a629283a831bf9460a8eac9f67a29fb7/
/raw/a629283a831bf9460a8eac9f67a29fb7/
a629283a831bf9460a8eac9f67a29fb7
bash
Bash
1
2019-06-10T15:51:55
True
False
False
/api/public/snipt/29210/
change-hostname
<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></span><span id="L-1"><a name="L-1"></a>sudo /bin/hostname mynewhostname </span></pre></div> </td></tr></table>
hostname

Bash

Change Linux hostname without reboot

1
2
3
vim /etc/hostname
vim /etc/hosts
hostname new-hostname
https://snipt.net/embed/b4d8178ec8afc5351a2dd41a01b06cd7/
/raw/b4d8178ec8afc5351a2dd41a01b06cd7/
b4d8178ec8afc5351a2dd41a01b06cd7
bash
Bash
4
2019-06-03T12:21:46
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></span><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

Bash

Solaris Configuration Reset

sys-unconfig
https://snipt.net/embed/ec1a10b654dab3b8c43d7e7054d20d68/
/raw/ec1a10b654dab3b8c43d7e7054d20d68/
ec1a10b654dab3b8c43d7e7054d20d68
bash
Bash
1
2019-06-07T06:44:41
True
False
False
/api/public/snipt/5644/
solaris-configuration-reset
<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></span><span id="L-1"><a name="L-1"></a>sys-unconfig </span></pre></div> </td></tr></table>
configuration, hostname, network, reset, solaris