I know that GUI does not cover most of functionalities, for good reasons - being specialized to task (like files app), it provides more fine-grained experience.

Yet, I find that there are common commands which is terminal-only, or not faithfully implemented. for instance,

  • Commands like apt update/apt upgrade might be needed, as GUI may not allow enough interactions with it.
  • I heard some immutable distros require running commands for rollbacks.

These could cause some annoyance for those who want to avoid terminal unless necessary (including me). Hence, I bet there are terminal emulators which restricts what commands you could run, and above all, present them as buttons. This will make you recall the commonly used commands, and run them accordingly. Is there projects similar to what I describe? Thanks!

You are viewing a single thread.
View all comments
4 points

Long ago I made such restricted shell with filtering the shell command history file then disabling command history logging. With some shell scripting, I think you can get more sophisticated version. What shell are you using? (Bash, Fish, Zsh, etc.)

permalink
report
reply
3 points

I am using bash, which is indeed part of the problem. What emulator would you suggest, and how did you achieve it?

permalink
report
parent
reply
2 points

Bash should be fine. On typical Bash installation I think this will work (please try to understand each command line before you actually try):

$ cp ~/.bashrc ~/.bashrc.bak
$ cp ~/.bash_history ~/.bash_history.bak
$ printf 'set +o history' >> ~/.bashrc
$ printf "sudo apt update\nsudo apt upgrade\n" > .bash_history
$ (Press Ctrl+D to logout)

For the next bash session you can refer only the two commands from the history with Up/Down/C-p/C-n.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.9K

    Monthly active users

  • 6.3K

    Posts

  • 175K

    Comments