I am new to silverblue, just downgrading from secureblue.
So, doing a clean install/setup of silverblue nice and slow.
I was following steps to create dnf aliases for ease of use but due to my lack of knowledge I need to ask for very simple (embarrassing) help…
dnf alias appears to be working but I get an error message:
/var/home/d/.bashrc: line 29: alias: `
alias dnf’: invalid alias name
/var/home/d/.bashrc: line 29: alias: -c: not found
/var/home/d/.bashrc: line 29: alias: #skip_sudo: not found
/var/home/d/.bashrc: line 31: tollbox: command not found
/var/home/d/.bashrc: line 33: tollbox: command not found
Here is my attempt to modify .bashrc with the dnf alias:
You seem to have multiple duplicate lines. You define the two aliases in lines 3 and 4, and then again at the end of the file, multiple times, in the lines that bash is complaining about.
Also, please do not post screenshots of terminals, they cannot be indexed and don’t work with screen readers. You can just copy the text and put it in your post as preformatted text using the </> button.
Ok, thank you for that info (screen shots). I saw what I assumed to be screen shots in other posts but will just copy/paste text in the future.
Yes, I sure saw those repeated complaints but don’t know how to fix the entries so that I get that alias for dnf correctly. I was following someone elses post on how to do this in .bashrc
I did not create those multiple lines at the end (at least I don’t believe I did). I was only trying to input those first two lines above. I’ll comment out those repeats at the end and see if that fixes it.
You should create a directory ~/.bashrc.d then place any file inside there with your new alias definitions. This part of the .bashrc file will process those files for you.
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc
I think your image shows the error.
Lines 3 and 4 define 2 different aliases properly.
The lines after the unset rc seem to show repeated efforts to define the same aliases, but all that are attempting to define the alias for dnf fail to include the closing " character which is mandatory.
It would be best to 1) remove all personal alias definitions from the .bashrc file, and 2) use a file as noted above in the ~/.bashrc.d directory to define each alias you choose. You can even create one new file for each alias if you wish, and 3) define each alias only once
I just simply use a .bash_aliases with my favorites
eg:
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
alias sl="ls"
alias lt='ls --human-readable --size -1 -S --classify'
alias df="df -Th"
alias left='ls -t -1'
alias count='find . -type f | wc -l'
alias mnt="mount | awk -F' ' '{ printf \"%s\t%s\n\",\$1,\$3; }' | column -t | egrep ^/dev/ | sort"
alias mntd="lsblk -e 7 -o name,size,type,fstype,mountpoint"
alias gh='history | grep'
alias cpv='rsync -ah --info=progress2'
alias ec4="sudo '/home/me/ExtremeCooling4Linux-v0.3-x86_64.AppImage' change-state"
alias st="sudo smartctl -a -t long /dev/sdb2"
alias grubmen="cat /boot/grub/grub.cfg | grep menuentry"
alias dp1="xrandr --output DP-2 --off"
alias dp2="xrandr --output DP-2 --auto"
alias ho=whoami
alias vk="vulkaninfo | grep "deviceName" "
I am so eli5 that I hope I don’t frustrate you or others with minuscule questions…
Do you create a file in the directory Jeff V suggested I build and is this the entire content of that .bash_aliases file?
No worries, ask away.
Yes I created the file, but follow @computersavvy suggestions first.
But I’ll add this to .bashrc
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
ls -al|rg bash
-rwxr-xr-x 1 me me 883 Dec 25 2025 .bash_aliases
-rw------- 1 me me 86 Oct 3 11:40 ..bash_aliases.kate-swp
-rw------- 1 me me 24018 Oct 3 10:29 .bash_history
-rw------- 1 me me 0 Jun 20 15:14 .bash_history-01177.tmp
-rw------- 1 me me 13281 Jan 22 2026 .bash_history-01273.tmp
-rw------- 1 me me 13241 Jan 22 2026 .bash_history-01314.tmp
-rw------- 1 me me 13139 Jan 22 2026 .bash_history-01316.tmp
-rw------- 1 me me 13257 Jan 22 2026 .bash_history-01330.tmp
-rw------- 1 me me 0 Aug 9 18:46 .bash_history-01378.tmp
-rw-r--r-- 1 me me 220 May 20 2025 .bash_logout
-rw-r--r-- 1 me me 57 Jun 7 2025 .bash_profile
-rw-r--r-- 1 me me 1346 Jun 16 13:27 .bashrc
My first question is at the basic silverblue install level. I was trying to add the alias dnf.
On a second issue, I am trying to learn and use a toolbox (first time use) to create Virtual manager. (this is also problematic and most researched commands just don’t work… I’ll be asking those in a separate post after I exhaust all research options)
(darn I hate to ask..)
Is .bash_rc another file I should edit?
.bashrc
.bashrc.d (I need to create this one)
.bash_aliases (I need to create this one)
.bash_rc (is this another file to work with?)
The directory is correct (2).
In that directory create any file named as you choose (3), but personally I would not create is as either .bashrc or .bash_aliases. Instead i would simply name it something simple such as aliases (and not hidden which happens when the first character is a dot .).
The code in that file would define your personal aliases.
I might note that alias sudo="sudo " is somewhat superfluous since the command sudo must always have a space after it anyway in order to be recognized as a command.
Also note that when you define an alias with the same name as a standard command the system will always use that alias definition unless you add the full path name to the system version of that command.
This may not be what you actually desire since the proposed alias for dnf will always both create a new toolbox and run the command dnf within that toolbox (It seems it may do so redundantly I might add). To avoid the redundancy you likely would need the full path to the system version of the dnf command within that alias.
https://LinuxCommand.org/ has a book available as a PDF file with several translations and written by a human before AI garbage appeared which students and colleagues starting out with Linux have found useful.
Ya, one of my problems is searching for answers, trying to implement them, and they don’t work. Or the other one is, only part of set of instructions exist and for a noob, there were one or two fundamental steps required to get there, but were left out because “we all already know that”. Another is because the answers relate to an older version set of instructions.
for Silverblue you need to run dnf from a toolbox.
If you haven’t created a toolbox.. toolbox create
This will create a fedora-toolbox-N where N is the release of the host, on my machine it is fedora-toolbox-45
This is the default toolbox for Fedora, and is what is used by default when you do toolbox run
To run commands from this toolbox. toolbox run command
aliases would be
alias command=“toolbox run command”
If you wanted to create a separate container to run everything in vice the default one you would need to do something like. toolbox create scooby
and then to run commands from that toolbox toolbox run -c scooby command
man toolbox-create and man toolbox-run are also good references.
Those will be Flatpaks if you installed them from the GUI.
The Virtual Machine Manager Flatpak (combined with its QEMU extension, which should be called just “QEMU” in the software store) works fine for me on another immutable distro, but with some limitations - e.g. you’re limited in what network configurations you can set up.