๐ Mastering Ports, SSH, and Editor Shortcuts: A Comprehensive Guide
Opening and Managing Ports
Control over your firewall and ports is crucial for security and application accessibility. Here's how you can open up a new port:
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload
To list all open ports, simply use:
firewall-cmd --list-all
Managing Users and SSH
Need to logout a user? Use this:
pkill -u username
SSH port forwarding can be handled with the following:
ssh -L port:127.0.0.1:port -l Account -N RemoteIP
SSH keys
- Generate SSH key pair:
- Add the content in
id_rsa.pub
to the remote server's.ssh/authorized_keys
file.
ssh-keygen -t rsa
Text Editor Tricks
- Select all instances of a word: double click the word, then press ⌘ + Ctrl + G (Mac) or Alt + F3 (Windows/Linux).
- Quick Column View: Press ⌘ (Ctrl on Windows) + Alt + 2 → 4 to open 2, 3, or 5 columns. Use 1 to return to a single column layout.
- Vertical selection: Use alt + click + drag.
Additional Shortcuts
Bring up login screen: Ctrl+Alt+F1 or Windows + L.
By mastering these commands and shortcuts, you'll find your workflow becomes smoother and more efficient. Whether you're managing a server or editing files, these tips and tricks are essential tools for any tech professional. Happy coding! ๐
ๆฒๆ็่จ:
ๅผต่ฒผ็่จ