cat /etc/issue
sudo apt-get update -y
sudo apt update
sudo apt upgrade -y
sudo netstat -tualpn
sudo netstat -tualp
/etc/apache2
/var/www/html
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
ssh -i ~/.ssh/id_rsa erichung@34.80.82.196
default:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
/usr/bin
/etc/environment
brew install ngrok #or snap install ngrok
ngrok config add-authtoken 2KQDERnnUjddPsWNMRhr3vsUeR1_3akBvNWQbgAMKNY8mH9ft
ngrok http <port>
安裝python3.8及pip3.8
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.8 python3.8-distutils -y
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.8 get-pip.py
export PATH=$PATH:/home/<your username>/.local/bin
vim 會將檔案內的所有的“search_from”字串替換成“replace_to”字串
:%s/search_from/replace_to/g
:set nowrap
:set wrap
passwd
fping -a -g 10.187.96.0/24
scp [file] [username]@[ip address]:[destination path]
sudo wg-quick up judge
ps -eaf | grep cmsResourceService
sudo iptables -A INPUT -p tcp --dport 8888 -j ACCEPT
only allow specific IP and Ports
sudo iptables -A INPUT -p tcp --dport 8888:8890 -s 140.116.0.0/16 -j ACCEPT
sudo apt install openssh-server
systemctl enable ssh.service
sudo systemctl start sshd.service
/opt/homebrew/Cellar
sudo chattr -a tmp
document.designMode='on'
/Library/Developer/CommandLineTools/SDKs/MacOSX[MaxOS Version].sdk/usr/include/c++/v1/bits
or
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/bits
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
wall "message"
write [user name]
use who
to show pts index
echo -e "Hello World.\n" > /dev/pts/7
mesg n
# mesg y
sudo ntpdate -b tw.pool.ntp.org
use ' ' to separate strings , and get only the first phrase
cut -d ' ' -f 1
sudo du -h /home/* | sort -rh | head -n 30
curl -sSf https://sshx.io/get | sh && sshx
sudo apt install openssh-server
sudo systemctl enable ssh
sudo ufw allow ssh
python -m http.server
sudo at 14:50 2024-02-04
[command]
Ctrl+D
sudo timedatectl set-timezone Asia/Taipei
netstat -tln
curl ifconfig.me
pip freeze | xargs pip uninstall -y
git config --global user.name erichung9060
git config --global user.email rthung96@gmail.com
ls /usr/bin/python3*
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
sudo update-alternatives --remove python3 /usr/bin/python3.9
sudo update-alternatives --config python3