728x90 ๐ง์ด์์ฒด์ 79 ๋ฆฌ๋ ์ค - ์๋น์ค ์์ฑ(systemctl) ์๋น์ค ์์ฑ nano /etc/systemd/system/my_service.service [Unit] Description=My Service After=network.target [Service] ExecStart=/usr/bin/python3 /path/to/app.py WorkingDirectory=/path/to/app/directory Restart=always User=my_user [Install] WantedBy=multi-user.target [Unit] : ์๋น์ค์ ์ด๋ฆ๊ณผ ์คํ ์์ ๋ฑ์ ์ ๋ณด๋ฅผ ์ ์ํฉ๋๋ค. [Service] : ์๋น์ค ์คํ ์ ํ์ํ ์ ๋ณด๋ฅผ ์ ์ํฉ๋๋ค. ExecStart : ์๋น์ค๋ฅผ ์์ํ ๋ช ๋ น์ด๋ฅผ ์ง์ ํฉ๋๋ค. WorkingDirectory : ์๋น์ค๋ฅผ ์์ํ ๋ ์ค.. 2023. 5. 9. ์๋์ฐ - ๋ฉ์์ง ๋ฐ์ค ๋์ฐ๊ธฐ(msg) msg %username% Your message here ์ถ์ฒ: https://superuser.com/questions/1278006/how-to-display-a-msgbox-directly-from-cmd How to Display a Msgbox directly from CMDI would like to display a message to the user by using CMD. The way I know to do so is by creating a .vbs (VBScript) file and execute it from CMD like this: (echo MsgBox "Line 1" ^& vbCrLf ^&a...superuser.com 2023. 5. 6. ๋ฆฌ๋ ์ค - WSL2 Ubuntu cmd์์ ์ ์ง์ Ubuntu ์ ์ง์ wsl -d ubuntu ์์ ๊ฒฝ๋ก ์ง์ wsl --cd / -d ubuntu WSL ๋ฆฌ์คํธ wsl --list 2023. 5. 4. ์๋์ฐ - ๋งฅ ์ฃผ์(MAC Address) ๋ณ๊ฒฝ with ๋ ์ง์คํธ๋ฆฌ ์์ ์๋์ผ๋ก ๋งฅ ์ฃผ์ ๋ณ๊ฒฝ: ์ฅ์น ๊ด๋ฆฌ์ > ๋คํธ์ํฌ ์ด๋ํฐ > ์์ฑ > ๊ณ ๊ธ > ๋ก์ปฌ ๊ด๋ฆฌ ์ฃผ์ > ๊ฐ ์์ ๋งฅ ์ฃผ์, ์ฌ์ค ์์ดํผ ๋ณ๊ฒฝ ํ์ธ ๋ช ๋ น์ด ipconfig /all cmd๋ก ๋ ์ง์คํธ๋ฆฌ ์์ (๊ด๋ฆฌ์ ๊ถํ ์คํ ํ์) reg add HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0001 /v NetworkAddress /d 000000000000 # ์ด๋๋ท์ผ ๊ฒฝ์ฐ netsh interface set interface "์ด๋๋ท" disable netsh interface set interface "์ด๋๋ท" enable # ์์ดํ์ด์ผ ๊ฒฝ์ฐ netsh interface set interface "Wi-F.. 2023. 5. 2. ์๋์ฐ - ์ธํฐ๋ท ๋๊ธฐ, DHCP ๊ตฌ์ฑ ํด์ /ํ ๋น(ipconfig /release, ipconfig /renew) ์ธํฐ๋ท ๋๊ธฐ(์ด๋๋ท) | DHCP ๊ตฌ์ฑ ํด์ (ํ ๋น๋์ด์๋ IPv4 ์ฃผ์ ํด์ ) ipconfig /release ์ธํฐ๋ท ์ฐ๊ฒฐ(์ด๋๋ท) | DHCP๋ก๋ถํฐ ์๋ก์ด IPv4 ์ฃผ์๋ฅผ ํ ๋น ipconfig /renew ์ธํฐ๋ท ๋๊ธฐ(์์ดํ์ด) ipconfig /release Wi-Fi ์ธํฐ๋ท ์ฐ๊ฒฐ(์์ดํ์ด) ipconfig /renew Wi-Fi ์ถ์ฒ: https://superuser.com/questions/1719455/ipconfig-release-renew-for-wi-fi-doesnt-work ipconfig release/renew for Wi-Fi doesn't work ipconfig /renew Wi-Fi ipconfig /release Wi-Fi Either of those commands don'.. 2023. 5. 2. ์๋์ฐ - cmd ๊ด๋ฆฌ์ ๊ถํ ์คํ์ธ์ง ํ์ธ ํ๊ธฐ @echo off bcdedit >>nul if %errorlevel% == 1 ( echo ๊ด๋ฆฌ์ ๊ถํ์ด ์๋๋๋ค. pause exit ) echo ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก ์คํํ์์ต๋๋ค. pause exit ์ถ์ฒ: https://gaesae.com/74 CMD ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก ์คํ ์ฌ๋ถ ์ฒดํฌํ๊ธฐ ๋ฐฐ์นํ์ผ ์์ฑ ์ ๊ด๋ฆฌ์ ๊ถํ์ด ํ์ํ ํ๋ก๊ทธ๋จ์ ์คํ์์ผ์ผํ๋ ๊ฒฝ์ฐ๊ฐ ์์ต๋๋ค. ํด๋น ์ฝ๋๊ฐ ์คํ๋๊ธฐ ์ ์ ๋ฏธ๋ฆฌ ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก ์คํ ๋์๋์ง ์ฒดํฌํ์ฌ ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก ์คํ๋์ง ์ gaesae.com 2023. 4. 27. ์๋์ฐ - ์ฌ์ฉ์ ๊ณ์ ์์ฑ ๋ฐ ๊ด๋ฆฌ์ ๊ถํ ๋ถ์ฌ(net user) ์ฌ์ฉ์ ๊ณ์ ๋ชฉ๋ก ํ์ธ ๋ช ๋ น์ด net user ์ฌ์ฉ์ ๊ณ์ ์์ฑ ๋ช ๋ น์ด net user ์ฌ์ฉ์์ด๋ฆ /add ์ฌ์ฉ์ ๊ณ์ ๋น๋ฐ๋ฒํธ ์ค์ (์ ๋ ฅ ํ๋กฌํํธ ํ์) net user ์ฌ์ฉ์์ด๋ฆ * ์ฌ์ฉ์ ๊ณ์ ๋น๋ฐ๋ฒํธ ์ค์ (์ธ๋ผ์ธ) net user ์ฌ์ฉ์์ด๋ฆ ์ฌ์ฉ์๋น๋ฐ๋ฒํธ ํน์ ์ฌ์ฉ์ ๊ณ์ ์ ๊ด๋ฆฌ์ ๊ถํ ๋ถ์ฌ ๋ช ๋ น์ด net localgroup administrators ์ฌ์ฉ์์ด๋ฆ /add ์ฌ์ฉ์ ์ญ์ net user ์ฌ์ฉ์์ด๋ฆ /delete ์ถ์ฒ: https://ssotori.tistory.com/96 '๋ช ๋ น ํ๋กฌํํธ'์์ ์ฌ์ฉ์ ๊ณ์ ์ ์์ฑํ๊ณ ๊ด๋ฆฌ์ ๊ถํ ์ฃผ๊ธฐ์๋์ฐ์์ ์๋ก์ด ์ฌ์ฉ์ ๊ณ์ ์ ์์ฑํ๋ ๋ฐฉ๋ฒ์ ์ฌ๋ฌ๊ฐ์ง๊ฐ ์์ต๋๋ค. โถ ์๋์ฐ10 ์๋ก์ด ์ฌ์ฉ์ ๊ณ์ ๋ง๋ค๊ธฐ(๋ก์ปฌ ๊ณ์ ) ํ์ง๋ง net ๋ช ๋ น์ด๋ฅผ ์ด์ฉํ๋ฉด.. 2023. 4. 19. ์๋์ฐ - ์๋์ฐ์ Open SSH Server ์ค์นํ๊ธฐ(with Chocolatey) 1. Chocolatey ํจํค์ง ์ค์น ๋๊ตฌ ์ค์น (ํ์์ + ๊ด๋ฆฌ์ ๊ถํ) Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) 2. openssh ์ค์น choco install openssh -params '"/SSHServerFeature /KeyBasedAuthenticationF.. 2023. 4. 19. ์๋์ฐ - ํ๋ก๊ทธ๋จ ํจํน ๋๊ตฌ(UPX) UPX(Ultimate Packer for eXecutables)๋ ์คํ ํ์ผ์ ํฌ๊ธฐ๋ฅผ ์ค์ด๋ ํ์ผ ํจํน ํ๋ก๊ทธ๋จ์ ๋๋ค. https://upx.github.io/ UPX: the Ultimate Packer for eXecutables - Homepage Welcome UPX is a free, secure, portable, extendable, high-performance executable packer for several executable formats. Introduction UPX is an advanced executable file compressor. UPX will typically reduce the file size of programs and DLLs by around 50%-.. 2023. 3. 18. ๋ฆฌ๋ ์ค - ํ์ฌ ์๊ฐ, ๋ ์ง ๋ณ๊ฒฝํ๊ธฐ(date, NTP) date ๋ช ๋ น์ด date # ํ์ฌ ์๊ฐ ํ์ธ sudo date -s "20230315 14:30:30" # ํ์ฌ ์๊ฐ ๋ณ๊ฒฝ date # ๋ฐ๋ ์๊ฐ ํ์ธ NTP(Network Time Protocol) ๋ช ๋ น์ด (์ธ๋ถ๋ก๋ถํฐ ์ ํํ ์๊ฐ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ค๋ ๋ฐฉ๋ฒ) sudo apt-get install ntp NTP ์ค์น sudo nano /etc/ntp.conf ์ค์ ํ์ผ ์์ server time.bora.net server kr.pool.ntp.org server time.bora.net server time.kornet.net ์ค์ ํ์ผ์ ํ๊ตญ ์๊ฐ NTP ์ฃผ์ ๋ฑ๋ก sudo service ntp restart NTP ์๋น์ค ์ฌ์์ 2023. 3. 12. ๋ฆฌ๋ ์ค - ๊ธฐ๋ณธ ๊ฒ์ดํธ์จ์ด ์ฃผ์ ๋ณ๊ฒฝ ๋ช ๋ น์ด(route) sudo route add default gw 192.168.0.2 # ์ถ๊ฐ sudo route change default gw 192.168.0.2 # ๋ณ๊ฒฝ sudo route del default gw 192.168.0.2 # ์ ๊ฑฐ ์๊ตฌ์ ์ผ๋ก ๋ณ๊ฒฝํ๊ณ ์ถ์ ๊ฒฝ์ฐ sudo vi /etc/network/interfaces ์ค์ ํ์ผ ์๋ํฐ๋ก ์ด๊ธฐ iface eth0 inet static address netmask gateway ์ค์ ํ์ผ์ ๋ด์ฉ ์์ sudo service networking restart ์๋น์ค ์ฌ์์ 2023. 3. 10. ๋ฆฌ๋ ์ค - ifconfig ์์ดํผ ๋ณ๊ฒฝ ๋ช ๋ น์ด $ ifconfig eth0 ์์) eth0์ IP ์ฃผ์๋ฅผ `192.168.0.100`๋ก ๋ณ๊ฒฝํ๊ธฐ $ ifconfig eth0 192.168.0.100 2023. 3. 10. ์ด์ 1 2 3 4 5 6 7 ๋ค์ 728x90