Results 1 to 7 of 7

Thread: Most useful unix commands.

  1. #1
    Join Date
    Oct 2020
    Beans
    0

    Most useful unix commands.

    What are the most useful unix commands ? or, your favorite commands??

  2. #2
    Join Date
    Jun 2020
    Beans
    334

    Re: Most useful unix commands.

    this is a very broad question
    can find some basic commands here

    to clean up system periodically (once a week) i use these

    Remove packages that didn’t install completely.
    Code:
    sudo apt-get autoclean
    Remove your apt-cache.
    Code:
    sudo apt-get clean
    Remove software dependencies that you don’t need.
    Code:
    sudo apt-get autoremove
    clear thumbnails
    Code:
    rm -rfv ~/.cache/thumbnails
    clear cache
    Code:
    sudo du -sh /var/cache/apt
    update
    Code:
    sudo apt-get update -y
    upgrade
    Code:
    sudo apt upgrade
    Kernel and other Cleanups after Deletions
    Code:
    sudo apt autoremove --purge
    Clear DNS Cache
    Code:
    sudo systemd-resolve --flush-caches
    my personal favourite?

    Code:
    windscribe connect
    Last edited by T6&sfpER35%; October 17th, 2020 at 09:10 AM.

  3. #3
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Most useful unix commands.

    mostly i use application commands. i think system is actually made from separate applications that bind into one. for example apt commands are form apt package manager, systemd commands are from systemd. so they won't work if you have old init based linux.
    there are probably not that many directly from Linux kernel or base of the system. but you can see some that go back to Unix time. just read about seq command yesterday. at first few examples it seemed pointless, but when more uses were demonstrated, it made it quite interesting. ls, rm, cd and such are probably brought over from unix as well.
    Read the easy to understand, lots of pics Ubuntu manual.
    Do i need antivirus/firewall in linux?
    Full disk backup (newer kernel -> suitable for newer PC): Clonezilla
    User friendly full disk backup: Rescuezilla

  4. #4
    Join Date
    May 2009
    Beans
    33

    Re: Most useful unix commands.

    sudo apt --fix-broken install

  5. #5
    Join Date
    May 2009
    Beans
    33

    Re: Most useful unix commands.

    screen

    It can be used to create multiple text-based "windows" inside a terminal. Eg, if you want to run a long package update process with lots of text flowing by, you can use screen to put it in the background, and then switch back and forth to watch the progress.

    You can also reattach to a screen session if you're forced to restart X, or if your SSH connection is broken, and your programs keep running in the background.

  6. #6
    Join Date
    Oct 2020
    Beans
    0

    Re: Most useful unix commands.

    Thank you everyone.
    I love du.exe in Windows system. It's convenient for me.

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Most useful unix commands.

    I have a few aliases for the commands I use most often:
    Code:
    # listings, history
    alias ls='ls -F'
    alias ll='ls -al'
    alias ltm='ls -alt| more'
    alias h='history'
    alias mkdir='mkdir -p'
    
    alias psg='ps -eaf | grep $*'
    alias iproute='ip route | column -t'
    
    # storage
    alias du='du -h'
    alias df='df -h'
    alias dft='df -hT -x squashfs -x tmpfs -x devtmpfs'
    alias lsblk='lsblk -e 7 -o name,size,type,fstype,mountpoint'
    
    # private browsing
    alias firepchrome='firejail --private chromium-browser --js-flags=--noexpose_wasm --mute-replay-warnings '
    alias firepff='firejail --private firefox '
    The order of the aliases matter.

    Besides those, ssh, rsync, egrep, dd, awk, sed, sort, cut, perl, nmap are extremely useful. For example,
    Code:
    $ lspci -vk |perl -lne 'print if /Ethernet|Network/ .. /^[\w]*$/'
    Last edited by TheFu; October 18th, 2020 at 01:07 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •