Linux commands
Here I want to summarize the most powerful and useful linux commands that I get to know during my ADA journey.
Tested on the following system. System: Ubuntu 20.04.03 LTS Shell: bash
# Compress/uncompress folder
tar -zcvf archive.tar.gz foldertozip/
# uncompress
tar -zxvf archive.tar.gz
# Change Default Shell for user
cat /etc/shells # show all available shells
sudo vim /etc/passwd # go to user and set the desired shell
# Check available disk space
df -h
# Fancy way to show CPU/RAM usage as well as running processes
htop
# Show folder size
du -shc folder/
# Best way to find out where programms are located
which cardano-cli
# Output
/usr/local/bin/cardano-cli
# find only the sudo or super users
grep '^sudo:.*$' /etc/group | cut -d: -f4
# or
getent group sudo | cut -d: -f4
# seatch and replace text in file
sed -i "s+SARCHPATTERN+NEWPATTERN+g" file.txt
Last updated