Ask Your Question
0

[propose] Add alternative command line trigger mange repo.

asked 2018-05-16 05:48:41 -0500

Adam Łangowicz gravatar image

updated 2018-05-16 05:52:31 -0500

DNF enable or disable repository by:
dnf config-manager --set-enabled < repo >
dnf config-manager --set-disabled < repo >

Propose of simplyfy it by:
dnf switch off < repository >
dnf switch on < repository >

Can be - aditional syntax.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-05-16 07:23:34 -0500

hhlp gravatar image

updated 2018-05-16 07:26:28 -0500

There are lot of ways to create alias. The most used ways are :

  1. Add aliases directly in your ~/.bashrc file :
alias er='dnf config-manager --set-enabled'   
alias dr='dnf config-manager --set-disabled'

Note :

->  er = enable repo
->  dr = disable repo

Next time (after you have logged out/in, or done . ~/.bashrc) when you type er or dr the command will be executed.

  1. The second method lets you make a separate aliases file and let your alias organized :
  • First : edit your ~/.bashrc file and add the following :

if [ -f ~/.bash_aliases ]; then

. ~/.bash_aliases

fi

  • Second : Add aliases directly in your ~/.bash_aliases file :
alias er='dnf config-manager --set-enabled' 
alias dr='dnf config-manager --set-disabled'

Note :

->  er = enable repo
->  dr = disable repo

Regards.,

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-05-16 05:48:41 -0500

Seen: 10 times

Last updated: May 16