We are looking to create a file with handy commands for Linux newbies and intermediate users. Add your suggestions, please. we want to keep it under 100 lines of text. We don’t want an all encompassing linux lesson. That would be too long and newbies would not read or use it. Also, it can have some nice commands that even experts might find handy. Sometimes, you just can’t quite remember that whole command. That is why I added the setup for virt-manager at the bottom.
# Helpful commands to get you started. There is no need to fear the command line. To paste into the terminal, (CTL+SHIFT+v). To copy from the terminal, (CTL+SHIFT+c).
# Restart or shutdown your system from the command line.
reboot poweroff
# This is the correct command to update your ROME system. It places a log file in your home directory that you can use if you are asking for help. dsync=distro-sync
sudo dnf clean all ; dnf clean all ; sudo dnf distro-sync --refresh --allowerasing 2>&1 | tee dsync-log.txt
# This is the correct command to update your ROCK system. It places a log file in your home directory that you can use when asking for help. up=upgrade
sudo dnf clean all ; dnf clean all ; sudo dnf upgrade 2>&1 | tee upgrade-log.txt
# Install a package, or packages. in=install
sudo dnf install *packagename* *packagename* *packagename*
# Remove a package. rm=remove
sudo dnf remove *packagename*
# Find a package you don't know the whole name of.
dnf search *partialname*
# Show the info for a package.
dnf info *packagename*
# List all of your repositories
dnf repolist
# Clean the cache
sudo dnf clean all
# Don't forget that you can get help for dnf easily.
dnf --help
# Get to a TTL with (CTRL+ALT+F3) through (CTRL+ALT+F6)
# Get back to the default session with (CTRL+ALT+F2)
# start, stop, restart, enable, disable services in your system. The flag '--now' can enable and start a service and go into effect without a restart of your system. Very handy.
sudo systemctl enable *servicename* --now
# List systemd unit files
systemctl list-unit-files
# List Status of a Systemd Service
sudo systemctl status service_name
# Start/Stop/Restart Systemd Service: Substitute stop or restart accordingly.
sudo systemctl start systemd_service
# Output that (any) command to a text file to post on the forums. You see it in the terminal window as well.
fastfetch --logo none 2>&1 | tee output.txt
Output that (any) command to a text file without seeing the result in the terminal window.
fastfetch --logo none > output.txt
# Current boot logs: all logs since last boot.
journalctl -b > current_boot.log
# Previous boot logs: all logs before the last boot
journalctl -b -1 > previous_boot.log
# List previous boots by number and date
journalctl --list-boots > listboot.log
# Error only logs: filter for critical issues
journalctl -p err > errors.log
# Kernel log: Isolate hardware and driver issues
journalctl -k > kernel.log
# Service specific logs
journalctl -u service_name > service.log
# Time range: Use these flags on the commands above
--since --until --since="1 hour ago"
# Real Time Monitoring: watch the logs as you reproduce an issue.
journalctl -f
# Get the info about your drives. In the order you would need for /etc/fstab.
lsblk -ao uuid,label,fstype,size,path,owner,ro
# Backup a copy of your repos, so you can restore them easily, even if you are offline. Don't wait till you need it. Placed in a folder in your /home directory called helpful.
cp -af /etc/yum.repos.d/. ~/helpful/yum.repos.bak/
# Backup your /etc/fstab file. Placed in a folder in your /home directory called helpful.
cp -af /etc/fstab ~/helpful/fstab
# If you are online, you can get a new default copy of the repos.
sudo dnf reinstall distro-release-repos
# Install some tools to get you building packages.
sudo dnf install basesystem-build rpmdevtools rpmlint packaging-tools --refresh
# How to setup virt-manager quickly.
sudo dnf install virt-manager qemu qemu-kvm iproute2-tc firewalld
systemctl start libvirtd
sudo usermod -G lp,wheel,audio,video,users,lpadmin,network,storage,sambashare,libvirt,qemu,kvm *your_user_name*
# I know this place is selling lessons and I am not pushing their product, but their cheat sheet is a really nice resource. They cover every single Linux command. This file cannot do that.
https://linux-commands.labex.io/
helpful-commands.txt (3.8 KB)
![]()
Credits: WilsonPhillips, Ben79
2026-08-31T22:00:00Z
helpful-commands-20260901.pdf (91,6 KB)