Happy Holi
More often than not for any service, I end up doing :
systemctl enable <service> systemctl start <service>
But there is shorcut to this. In systemctl command when you enable the service, you can use “–now” to start the service as follows:
systemctl enable --now <service>
quite a timesaver 🙂
Linux is powerful, flexible, and can be adapted to a broad range of uses. While best practices for administrating Linux servers are not hard to find due the popularity of the operating system, there is always a need for up-to-date Linux advice, along with the best tips, from our experienced Toptal Linux administrators.
<p>
Have you ever typed a command in your terminal, only to find out you forgot to prefix it with the
</p>
<div class="codecolorer-container text solarized-light" style="overflow:auto;white-space:nowrap;width:550px;">
<table cellspacing="0" cellpadding="0">
<tr>
<td class="line-numbers">
<div>
1<br />
</div>
</td>
<td>
<div class="text codecolorer">
sudo
</div>
</td>
</tr>
</table>
</div>
<p>
command? You have to retype the whole command again just to add the
</p>
<div class="codecolorer-container text solarized-light" style="overflow:auto;white-space:nowrap;width:550px;">
<table cellspacing="0" cellpadding="0">
<tr>
<td class="line-numbers">
<div>
1<br />
</div>
</td>
<td>
<div class="text codecolorer">
sudo
</div>
</td>
</tr>
</table>
</div>
<p>
in front of it. Frustrating!
</p>
<p>
Well, you can add this simple alias to your
</p>
<div class="codecolorer-container text solarized-light" style="overflow:auto;white-space:nowrap;width:550px;">
<table cellspacing="0" cellpadding="0">
<tr>
<td class="line-numbers">
<div>
1<br />
</div>
</td>
<td>
<div class="text codecolorer">
.bashrc
</div>
</td>
</tr>
</table>
</div>
<p>
to help you reduce the frustration:
</p>
<pre>
|
1
|
Found a simple method to check for all the packets dropped by kernel.
First you need to install dropwatch with
dnf install dropwatch
and details of the package
- Name : dropwatch
- Arch : x86_64
- Epoch : 0
- Version : 1.4
- Release : 13.fc24
- Size : 27 k
- Repo : fedora
- Summary : Kernel dropped packet monitor
- URL : http://fedorahosted.org/dropwatch
- License : GPLv2+
- Description : dropwatch is an utility to interface to the kernel to monitor for dropped
- network packets.
Continue reading
How many times you have felt that there was some simple way to convert bash ansi escape sequences ( colors as well in terminal ) to html equivalent so that you can send the same as html report in email. Here is simple solution. One way is to use ccze if you are using this for logs – colorize your logs and for more generic solution.
dnf install python3-ansi2html.noarch
after this is installed, you can use something like this:
Continue readingIf you are using pmap or using strace and want to covert kernel address to function name then you can use the following technique.
First you need to install elfutils, if not installed.
dnf install elfutils
and after this you can use the following command
eu-addr2line -f -e /boot/vmlinuz-$(uname -r) <addr> #Example eu-addr2line -f -e /boot/vmlinuz-$(uname -r) 00007f36a8045000