0%

sudo -i switch to the root user

passwd change password for current user

create alias

1
alias ip = 'curl ipinfo.io/ip'

this is available only in the current shell session

to make persistent, add that into ~/.bashrc

~/.bashrc file is executed whenever bash shell started

~ represents user's home directory

enable no password login

  1. edit the config file
1
sudo nano /etc/pam.d/gdm-password
  1. add rule to the first line:
1
auth sufficient pam_succeed_if.so user = sdcgvhgj

run a script on startup

  • crontab -e edit the cron table
  • add a new line at the bottom
1
@reboot /path/to/script arg1 arg2
  • crontab -l list cron table

another way: use systemd

append a line to crontab

1
(crontab -l; echo "0 4 * * * myscript")| crontab -

difference between ; and &&

link

In cmd1 && cmd2, cmd2 is only executed if cmd1 succeeds (returns 0).

In cmd1 ; cmd2, cmd2 is executed in any case.