• How to paste apt-get and make the terminal read like pacman commands.


    Hi. I’ve tried to edit my .bashrc file so that I can paste Debian based apt-commands directly in my terminal and make the terminal treat them as Pacman commands.
    This is useful when I’m following guides originally written for Debian based systems.
    I have tried to do something like this: alias sudo apt-get update='sudo pacman -Syy’
    And this: alias apt-get update='pacman -Syy’
    But that didn’t work, may someone point me in the right direction here?
    Thanx.

    Peace, Love and Penguins.

  • @catsndogs
    First of all, I’d recommend learning the pacman syntax, since the commands are not exactly one to one.

    There’s a comparison list of commands here: https://wiki.archlinux.org/index.php/Pacman/Rosetta

    If you still wish to make pacman behave like apt-get, I’d recommend using bash functions instead of aliases, since they are much more versatile.

    Example:

    apt-get()
    {
        # Assume command line as: apt-get <command> [parameters]
    
        local command="$1"
    
        shift
    
        case "$command" in
            # Add more of your favourite commands here!
            # See also: https://wiki.archlinux.org/index.php/Pacman/Rosetta
            # for more help about the commands.
    
            install)
                sudo pacman -S --needed "[email protected]"
                ;;
            remove)
                sudo pacman -Rsn "[email protected]"
                ;;
            update)
                sudo pacman -Syy
                ;;
            upgrade)
                sudo pacman -Su
                ;;
        esac
    }
    

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL here.

  • @manuel Solved! 🙂 Thanx man.

    Peace, Love and Penguins.

  • @catsndogs So if you feel this is solved, please mark the thread as such. There’s a button below for that. 🙂

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL here.

  • Sorry, didn’t notice you already marked it! 🙂

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL here.

  • @manuel @developers 🙂 I’ve also tried to edit the tags for the post several times from both FF and Chromium without luck, I get a notice that says the connection being lost even if my line is quite ok. It ended in a notice that told me that Akismet has flagged my post as spam.

    Peace, Love and Penguins.

  • @catsndogs
    This is a known bug in the forum software. Hopefully it gets resolved soon!

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL here.

  • @manuel ok nice to know!

    Peace, Love and Penguins.

  • Oh! That last spam stuff is news to me!

    Please report issues including all details! ;-)
    Show files here: cat "file" | curl -F [email protected] https://ptpb.pw/?u=1
    and show the URL here.

  • yea guess it’s because I tried to post the same post over and over again, and Akismet did notice it but the forum software did not.

    Peace, Love and Penguins.

pacman109 terminal41 paste3 apt-get1 Posts 10Views 648
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.