Helpful Commands for OpenMandriva users

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)

cc
Credits: WilsonPhillips, Ben79

2026-08-31T22:00:00Z
helpful-commands-20260901.pdf (91,6 KB)

8 Likes

There’s plenty of room left folks. I can use some ideas.

Also handy probably isn’t the best name for the folder. I need something that would translate well and be understood.

Would this be something that would be worth putting into a user’s ~/home folder during install? Or on the desktop?

Perhaps commands to post logs or terminal output when users have problems?

1 Like

You are the resident pro at that @ben79. Post’em good sir.

Basic Log Collection Commands

  • Current Boot Logs : Run journalctl -b > current_boot.log to save all logs since the last reboot.

  • Previous Boot Logs : Use journalctl -b -1 > previous_boot.log to capture logs from the immediately preceding boot session.

  • List Previous Boots: Use journalctl --list-boots to list previous boots by number date and time.

  • Error-Only Logs : Filter for critical issues with journalctl -p err > errors.log to capture errors and higher-priority messages.

  • Kernel Logs : Isolate hardware or driver issues with journalctl -k > kernel.log .

    • Service-Specific : Use journalctl -u service_name to isolate logs for a specific systemd unit.
  • Time-Range : Use --since and --until (e.g., --since="1 hour ago" ) to limit logs to a specific incident window.

  • Real-Time Monitoring : Use journalctl -f to watch logs live while reproducing the issue.

  • List Systemd Unit Files : Use systemctl list-unit-files

  • List Status of a Systemd Service : Use sudo systemctl status service_name.

  • To Start/Stop/Restart Systemd Service : Use sudo systemctl start systemd_service Substitute stop or restart accordingly.

This should gather a lot of potentially useful info for most problems. Users can try these commands now to see what they look like in Konsole(terminal), what they do, and just be used to the existence of these for problem solving.

Note: Most journalctl commands can be run as root (sudo) or user though the output may not be the same. Some of these will require sudo. If this becomes important the person helping will tell you which to do otherwise I do these as user myself.

Last edit: 2026-08-23T05:00:00Z
cc

2 Likes

Well done sir! I put them in. I hope you don’t mind that I edited them to match the format of the text file.

Thanks for the kind words. I just added a few for systemd using systemctl.

1 Like

New users are terrified of the terminal. Mainly because they have no idea what to do when they open it. This can give them some ideas of things that they can easily do.

1 Like

It’s at 102 lines counting the spaces. I think it is a good tool. There are things in there that I use and will use regularly.

For users new to Linux about the easiest way to get used to and gain confidence using the cli or Command Line Interface is simply to do package management in Konsole(terminal). It is simple and easy.

  • Install : To install a package use sudo dnf in package_name. You can list multiple packages with a space between each package_name. in is an alias for install.
  • Remove : To remove a package use sudo dnf rm package_name. rm is an alias for remove.
  • Upgrade Rock System : sudo dnf up --refresh up is an alias for upgrade.
  • Upgrade ROME or Cooker System : sudo dnf dsync --refresh. dsync is an alias for distro-sync.
  • Search : To search for software packages use dnf search <keyword>.
  • Information : For information about packages use dnf info package_name.
  • Repositories : Use dnf repolist to list available sources or repositories enabled on your system.
  • Cache : Use sudo dnf clean all to remove cached metadata and package files, which helps recover from corrupted states or reclaim disk space.
  • For More Info about dnf : Use dnf --help or for even more use man dnf5 in ROME, in Rock this might be man dnf or man dnf4 not sure. Will check.

You can see that the commands are simply exactly what the command does in most cases. Granted this is not as intuitive for non native English speakers.

Note: For ROME or Cooker users sometimes it is needed to use an option --allowerasing to upgrade a system with dnf dsync. LIke this sudo dnf dsync --allowerasing --refresh. If you use this pay attention to what the transaction will remove, if it removes anything, just in case. If you have a question ask in the Support Forum with a descriptive title and all Konsole(terminal) output posted as code. (Use the </> icon for code.)

Last edit: 2026-08-23T05:00:00Z
cc

2 Likes

I guess if you’ve got the ping command, then complementing it with the traceroute would be a good thing.

2 Likes

This is a great idea, especially keeping it under 100 lines. New Linux users usually need a small reference they can actually come back to rather than a huge list of commands they’ll never read.

I’d probably add a few basics like pwd, ls -la, cd, cp, mv, and maybe journalctl for troubleshooting. A short note about what each command is for would also make it much more beginner-friendly. I like the approach of keeping it practical — even experienced users forget commands sometimes. Phonexa also uses that kind of practical, workflow-focused approach when dealing with more complex processes.

Thank you for your input. We do appreciate it.

I don’t think we want it to get any larger than it is now. As far as those basics, this is not meant to be an all encompassing Linux course. This was discussed by the leadership before this project started. That is why I placed the link to the resource site at the bottom of the page. You should check it out. I am not affiliated with it in any way, but I am impressed with what they built. Every single command is there. Click on each one and you get an in depth look.

https://linux-commands.labex.io/

As far as journalctl, there are some in the list. These are the ones that @ben79 is constantly putting into posts to help users troubleshoot. These are some of the most important commands in that list. :grinning_face:

1 Like

Mike, in an effort to get it smaller, I removed ‘ping’.

1 Like

I don’t think size matters so much as organization (easy for new users to locate a Thing). ‘ping’ is useful and IMO an essential basic.

3 Likes