# Ubuntu command note ### Step by Step upload git repository ```bash! # Xóa .git cũ để tạo mới rm -R .git # Tạo mới repo git ở local git init # Add tất cả các commit vào stage git add . # Commit code git commit -m "commit message" # Thêm url của repo vào local git remote add origin <url của repo, phải là https> # Push code lên git origin git push -u origin <tên của current branch> ``` ### Config git username, email ``` git config --global user.name "your_github_username" git config --global user.email "your_github_email" git config -l ``` ### Store given record git ``` git config --global credential.helper cache ``` ### Delete git cache ``` git config --global --unset credential.helper git config --system --unset credential.helper ``` ### Connect OpenVPN ```bash! openvpn3-as https://${URL_VPN_SERVER} openvpn3 session-start --config AS:${URL_VPN_SERVER} sudo openvpn3 session-start --config AS:csocsgvpn.fpt.net sudo openvpn3 sessions-list ``` ### Start App OBS Studio ``` flatpak run com.obsproject.Studio ``` ### Dump Mongo Data #### Dump 70 ```! mongodump mongodb://ktht:123456@172.27.17.70:27017 --db --collection -o /media/le/MyUbunny/MongoDump mongodump mongodb://ktht:123456@172.27.17.70:27017 --db --collection -o /media/ubunchu/MyClone/dump/ ``` #### Dump 68 ```! mongodump mongodb://ktht:123456@172.27.17.68:27017 --db --collection -o /media/le/MyUbunny/MongoDump mongodump mongodb://ktht:123456@172.27.17.68:27017 --db --collection -o /media/ubunchu/MyClone/dump/ ``` #### Dump 72 ```! mongodump mongodb://ktht:ktht8inf@172.27.17.72:27017/icdp_db --collection -o /media/le/MyUbunny/MongoDump mongodump mongodb://ktht:ktht8inf@172.27.17.72:27017/icdp_db --collection -o /media/ubunchu/MyClone/dump/ ``` ### Restore Mongo Data ```! mongorestore --port 27017 --db --collection /media/le/MyUbunny/MongoDump/ --drop mongorestore --port 27017 --db --collection /media/ubunchu/MyClone/dump/ --drop ``` ### Build Java to systemd ```! https://www.auroria.io/spring-boot-as-systemd-service/ ``` ### Re Mount lại ổ đĩa ```bash! mount | grep ^/dev/sd umount /dev/sdb1 grep "/dev/sdb1" /etc/fstab mkdir -p /media/ubunchu/Backup mount -t ext4 -o rw,noatime,users /dev/sdb1 /media/ubunchu/Backup ``` ### Config proxy nodejs ```shell! npm config set proxy http://proxy.hcm.fpt.vn:80 npm config set https-proxy http://proxy.hcm.fpt.vn:80 ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up