I'm currently writing a script that installs and configures the Samba server automatically for me. I was wondering why this command sudo apt-get -y install samba > /dev/null && sudo systemctl enable smbd.service > /dev/null still gives this output.
Extracting templates from packages: 100%
Synchronizing state of smbd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable smbd
How can I prevent the commands from giving any output?
Thanks
Ubuntu Server 20.04.3 LTS
sudo apt-get -yy install samba 1> /dev/null 2> /dev/null && sudo systemctl enable smbd.service 1> /dev/null 2> /dev/null(it redirects stderr too). – user.dz Jan 01 '22 at 16:28