There are only specialized instances where that command would be needed and since it is out of the scope of this discussion should not even be mentioned. That file is very specific, is binary, and almost never needs updated.
NO NO NO
That command does not ever do a one time change and is never to be done without understanding how to use it and what it does.
Please do not make recommendations that it seems you yourself do not understand.
I was momentarily forgetting the name grub2-editenv when I said that (I’m bad at remembering all kinds of names). But I do understand it and sudo grub2-editenv /boot/grub2/grubenv set next_entry='title of the desired entry'
does the thing that was wanted and was what I was trying to remember. Don’t assume someone misunderstands when you might be the one who has misunderstood.
Depending on the contents of /boot/grub2/grubenv, the above command might have needed some advance setup. I’m not sure. I do understand how it works, I just don’t know what was likely to be in grub settings in @crazymonkey 's system and that setting alone depends on some other context.
So I started a new thread and got the makings of a better answer (which I hadn’t known before):
Of course that sets the same thing in /boot/grub2/grubenv that I would have set. It seems (though I haven’t tested well) that it also covers the other details that I thought I needed to ask for system specific info to cover. That doesn’t mean the grub2-editenv method is unsafe or incorrect, just potentially less general.
That file also isn’t really binary. It is fixed length text, which is very unlikely to keep correct if editing with a text editor. So I wouldn’t suggest using a text editor.
That file is a very reasonable thing to modify, if you know what you are doing, which I do and I have usefully modified it many times in the past. It is a significant amount harder to tell someone in a forum what to do than it is to do it yourself, because there is always something about their system that you might need to know and don’t. So I’m glad somebody told me about grub2-reboot even though for my own use that does nothing different from grub2-editenv.
If grub2-reboot didn’t exist (or nobody had told me about it), I would have found a good answer using grub2-editenv, I just would have needed more info about his computer before having confidence in such an answer.