Top useful Linux command
Print word
echo "Hello world"
Display the manual of any command
man pwd
show current working location
pwd
show current working location files
ls -l -h
go to find
cd Documents
go back one level up
cd ../
go back to home
cd ..
delete file
rm xxx.txt
delete folder
rm -r -f LlamaGPTJ-chat
create folder
mkdir text_folder
download file from internet
wget
Change file permissions
chmod 777 LlamaGPTJ-chat
show folder size
du -sh LlamaGPTJ-chat
install software in mac using brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew --version
install software in linux
sudo apt install xxx
install software with brew
brew install nano
using nano
create txt file
nano
edit current txt file
nano test.txt
show file content
cat test.txt
clear window
clear
show username
whoami
download file from internert
wget xxx
or
curl xxx
find file by name
sudo find / -name "python3.9*"
IP address
For mac
ipconfig getifaddr en0
For linux
ip address | grep eth0| grep inet |awk '{print $2}'
show calendar
cal
show running program
top
kill process
with id
kill 1341
with name
pkill - f xxx