Skip to content

Instantly share code, notes, and snippets.

@coin8086
Last active November 8, 2024 02:00
Show Gist options
  • Save coin8086/296978c5919cd32ae0340d12f916c94f to your computer and use it in GitHub Desktop.
Save coin8086/296978c5919cd32ae0340d12f916c94f to your computer and use it in GitHub Desktop.
Linux Notes

Linux Notes

Bash test command

Use [[ ... ]] instead of [ ... ] to test a condition in Bash. The latter is poor in function and unmentioned in the official GNU Bash document at all.

Disable password login for user

passwd -l {username}

while the SSH key login is still possible for the user.

To enable the password login again:

passwd -u {username}

Note: this enable a user to login without a password!

passwd -d {username}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment