Showing posts with label Fedora. Show all posts
Showing posts with label Fedora. Show all posts

Wednesday, August 21, 2019

Stop NetworkManager to overwrite /etc/resolv.conf

Network manager overwrite the /etc/resolv.conf file. To stop overwriting this file. We can follwo the below steps

# systemctl disable NetworkManager.service
# systemctl stop NetworkManager.service
Or If we don't want to stop or disable the network manager service, in that case. We will have to tell NetwoekManager not to modify the DNS settings:

 /etc/NetworkManager/NetworkManager.conf
 [main]
 dns=none

SSH Server related basic command

Install

To install the openssh-server, you need to install the openssh-server package:
sudo dnf install -y openssh-server;

Start

To start the sshd daemon (openssh-server) in the current session:
sudo systemctl start sshd.service;

Stop

To stop the active (if any) sshd daemon in the current session:
sudo systemctl stop sshd.service;

Enable

To configure the sshd daemon to start automatically at boot time:
sudo systemctl enable sshd.service;
You will get an output similar to this:
ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service'

Disable

To configure the sshd daemon to stop automatic initialization at boot time:


sudo systemctl disable sshd.service;