More Linux Flashcards
How do you check the memory usage of your system?
Use the free command or top command and look at the memory section.
What command can you use to display the disk usage of a directory?
Use the du command (Disk Usage).
How do you add a user to a specific group in Linux?
Use the usermod -aG command, for example: sudo usermod -aG groupname username.
What is the purpose of the chown command?
Changes the owner of a file or directory.
How do you display the routing table in Linux?
Use the netstat -r command or ip route command.
What command is used to manage software packages in Red Hat-based systems?
Use the yum or dnf command.
How do you check the version of your Linux distribution?
Use the lsb_release -a command or check the contents of /etc/os-release.
What is the purpose of the ps command?
Lists the currently running processes.
How do you set up SSH key-based authentication?
Generate SSH key pair with ssh-keygen, then add the public key to the ~/.ssh/authorized_keys file on the remote server.
How do you restart the SSH service in Linux?
Use the sudo systemctl restart sshd command.
What is the purpose of the /etc/passwd file?
Stores essential information about users on the system.
How do you check the integrity of system files in Linux?
Use the md5sum or sha256sum command to generate checksums and compare them with known good checksums.
What command is used to display real-time network statistics?
Use the iftop command.
How do you set up a static route in Linux?
Use the ip route add command to add a static route.
What is the purpose of the journalctl command?
Used to query and display messages from the systemd journal.