Hola Juan, la respuesta es sí, tú puedes crear un alias que contenga los comandos que necesites, siempre y cuando esté entre comillas. El comando podría ser así
alias update-os=”sudo apt update && sudo apt upgrade”
El doble ampersand significa AND, y lo que hace es ejecutar el segundo comando siempre y cuando el primero no falle.
Aquí más ejemplos
alias lsof-port=”sudo lsof -i -P -n | grep LISTEN” alias netstat-port=”netstat -tulpn | grep LISTEN”
Espero y se haya entendido el ejemplo y la explicación.
Report
There was a problem reporting this post.
Block Member?
Please confirm you want to block this member.
You will no longer be able to:
See blocked member's posts
Mention this member in posts
Invite this member to groups
Message this member
Add this member as a connection
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.