Tag Archives: Linux Mint

Running everything as root without sudo on every line

Running everything as root without sudo on every line

If you have a list of commands that needs to be executed as root, without having to put sudo on every line, or, if you have commands that uses “>” character to redirect standarad output to a file that require root to write to, like this

echo "text" > /root/some-file.txt

You can do this:

sudo -s

Continue reading Running everything as root without sudo on every line

Reset iptables to default (accept all) without restart

If you haven’t done anything to preserve iptables settings on reboot, a restart could clear out all settings, but if you do not want to restart, you can use this:
Continue reading Reset iptables to default (accept all) without restart

Traceroute is not installed by default on Ubuntu, replaced by mtr

To my surprise, when trying to run this command on Linux mint 17, based on Ubuntu 14.04, I found out that traceroute is not available anymore.

 $ traceroute google.com
The program 'traceroute' can be found in the following packages:
 * inetutils-traceroute
 * traceroute
Try: apt-get install <selected package>

After doing a bit of searching, I found out that there is a new command, that does roughly the same job, but it display the output as live updating as it does pinging of the hosts through the route.

If you do not like this change, you can always install traceroute

 $ sudo apt-get install traceroute

mtr is executed like this:

 $ mtr google.com

And the result:

                             My traceroute  [v0.82]
s-20-75 (0.0.0.0)                                      Tue Sep  9 23:31:10 2014
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                       Packets               Pings
 Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. hidden-address                   66.7%    13    0.5   4.1   0.5  14.8   7.1
 2. hidden-address                    0.0%    13    1.4   1.4   1.1   2.6   0.4
 3. hidden-address                    0.0%    13    5.0   5.0   4.9   5.4   0.1
 4. hidden-address                   90.9%    12    4.8   4.8   4.8   4.8   0.0
 5. google.as15169.fr.eu              0.0%    12    5.1   5.1   5.1   5.3   0.1
 6. 72.14.238.228                     0.0%    12    5.4   6.9   5.4  16.1   3.3
 7. 209.85.243.47                     0.0%    12    5.8   5.6   5.5   5.9   0.1
 8. par10s10-in-f5.1e100.net          0.0%    12    5.3   5.3   5.2   5.5   0.1