What are the most useful unix commands ? or, your favorite commands??
What are the most useful unix commands ? or, your favorite 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.
Remove your apt-cache.Code:sudo apt-get autoclean
Remove software dependencies that you don’t need.Code:sudo apt-get clean
clear thumbnailsCode:sudo apt-get autoremove
clear cacheCode:rm -rfv ~/.cache/thumbnails
updateCode:sudo du -sh /var/cache/apt
upgradeCode:sudo apt-get update -y
Kernel and other Cleanups after DeletionsCode:sudo apt upgrade
Clear DNS CacheCode:sudo apt autoremove --purge
my personal favourite?Code:sudo systemd-resolve --flush-caches
Code:windscribe connect
Last edited by T6&sfpER35%; October 17th, 2020 at 09:10 AM.
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
sudo apt --fix-broken install
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.
Thank you everyone.
I love du.exe in Windows system. It's convenient for me.
I have a few aliases for the commands I use most often:
The order of the aliases matter.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 '
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