nixCraft Linux / UNIX Newsletter

Link to [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format

How to append text to a file when using sudo command on Linux or Unix

Posted: 02 Mar 2020 11:00 AM PST


I am trying to add entry to /etc/hosts file using 'sudo echo '192.168.1.254 router' >> /etc/hosts' command, but getting an error that read as, -bash: /etc/hosts: Permission denied. How do I insert or append text to a file when running sudo command on Linux or Unix-like system?

The post How to append text to a file when using sudo command on Linux or Unix appeared first on nixCraft.

How to enable firewalld logging for denied packets on Linux

Posted: 02 Mar 2020 10:52 AM PST

How do I enable firewalld logging for denied packets on Linux operating systems so that I can view all dropped packets information? How can I view a log of the traffic blocked by FirewallD under a CentOS/RHEL (Red Hat Enterprise Linux)/Suse/OpenSUSE Linux?

The post How to enable firewalld logging for denied packets on Linux appeared first on nixCraft.