Command | Comment |
$ sudo su - | Get root privileges and load the root user’s environment. |
$ sudo !! | Repeat the last command with sudo privileges. |
$ printenv | Prints all environment variables. |
$ ssh-copy-id remote-host | Use locally available keys to authorize logins on a remote machine. |
$ journalctl -rx -p 4 | Displays logs in the reverse order with extra information (if available) for priority 4 (warning) or higher. |
$ getenforce | Get the current mode of SELinux. |
$ firewall-cmd --list-all | List everything added for or enabled in all policies. |
$ firewall-cmd --add-service=example --permanent
$ firewall-cmd reload | Permanently add a service and reload firewall rules so permanent config become new runtime config. |
$ grep -rL "example" * | Search through all files, including those in subdirectories, and list the ones that do not contain the string "example" . |
$ git checkout -b example $ git add . $ git status $ git commit $ git push $ git checkout main $ git pull $ git branch -d example | Create a new branch, add and commit changes, push to a remote repository, switch back to the main branch, pull updates, and delete the example branch. |
$ dnf autoremove | Remove unnecessary packages. |
Leave a Reply