How to append text to a system file via terminal with sudo command

echo ‘192.168.1.254 router’ | sudo tee -a /etc/hostsNAME tee — pipe fitting SYNOPSIS tee [-ai] [file …] DESCRIPTION The tee utility copies standard input to standard output, making a copy…