I'm trying to find a way to start and enable a systemd service using one command line.
Something like
Code:
sudo systemctl {start,enable} nfs-secure-server <----- doesn't work
I do have options. I use vi key bindings so doing one command and then using k to bring it back from history and replace one word is easy. I'm sure the default emacs bindings have a similar shortcut. Just looking for a succinct one liner.
Code:
sudo systemctl start nfs-secure-server
up arrow or using vi key bindings
Code:
sudo systemctl enable nfs-secure-server
or
or
Code:
sudo systemctl enable nfs-secure-server && sudo systemctl start nfs-secure-server
Just wondering if someone knows of a better way?
Thanks,
Gary