0

How is it possible that I can password lock my terminal. I do not want anybody but me in the terminal. I want it so like when I start up the terminal, it will ask for a password, and if the password is incorrect, it will exit out, or maybe ask again. What are my possible ways I can do this?

2 Answers2

2

1) Right click on the terminal window and select Profiles -> Profile Preferences

2) Go to Title and Command tab

3) Check "Run a custom command" and in the Custom Command field, add su yourusername

4) Open a new window to check if this works

enter image description here

Suggestions:

  • Some users run into a problem with su command, mainly this error su initgroups: Operation not permitted . In such case , use sudo su yourusername. If you do that make sure that you add line Defaults timestamp_timeout=7 in /etc/sudoers file so that after 7 minutes if someone wants to run something with root privileges , the won't be able to, because sudo has timed out. And it's a good security practice in general
Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
0

Lock your desktop if you're stepping away from your computer. Winkey (or meta key) + L will lock your screen. As long as you've set a password on your account, nobody else will be able to access it.