I basically want to make an alias to modify '/etc/systemd/logind.conf' file. To change #HandleLidSwitch=ignoreToHandleLidSwitch=ignoreHow can i do it? 
I want to make an alias to edit a file using nano. Is it possible?
shell;files
You wouldn't even need nano. You could do it like this:alias enableLid='sudo sed -i s/^#HandleLidSwitch=ignore/HandleLidSwitch=ignore/ /etc/systemd/logind.conf'alias disableLid='sudo sed -i s/^HandleLidSwitch=ignore/#HandleLidSwitch=ignore/ /etc/systemd/logind.conf'If you want to have one alias to toggle the setting I would create a shell script for it. If you want to use nano anyway:alias editLogindconf='sudo nano /etc/systemd/logind.conf'