-
(์ธ๋ถ๋งํฌ)๋ฆฌ๋ ์ค์ธ๊ธฐ์์๋ณด๋๊ณณ_https://distrowatch.com/
-
(์ธ๋ถ๋งํฌ)๋ช ๋ น์ด ๋น๊ต Arch & Red Hat/Fedora & Debian/Ubuntu & SLES/openSUSE & Gentoo
- Qalculate! library and CLIํฐ๋ฏธ๋์์ ์ฐ๋ ๊ณ์ฐ๊ธฐ(qalc)
- linux์์ ์ฐ๋ ๊ทธ๋ฆผํ ๊ฐ์๊ฑฐ & VSCode์ Draw.io)
-
ํ๋ก์ธ์๊ด๋ จ
-
echo๊ด๋ จ
-
cat๊ด๋ จ
-
network๊ด๋ จ
-
xxd
-
GNU ๋ฐ์ด๋๋ฆฌ ์ ํธ๋ฆฌํฐ
- Linux Tutorial
-
์ต์ ํ ์๋ ์ค์น
-
node 22.17์ต์ ํ์ผ๋ก ์ค์น(node 18์ญ์ ํ๊ณ ํ๋ ๋ฐฉ๋ฒ)
r/Linux 370,000
r/Ubuntu 108,000
r/LinuxMint 23,957
r/Fedora 18,925
r/ManjaroLinux 11,087
r/openSUSE 7,359
r/SolusProject 5,965
r/NixOS 3,051
r/voidlinux 1,802
r/MXLinux 478
- ใ์ ๋์ค ๋ฆฌ๋ ์ค ๋ช ๋ น์ด ์ฌ์ ใ์ ๊ฐ์ ํ. ๋น ๋ฅด๊ฒ ์ฐพ์ ์ฝ๊ฒ ํ์ฉํ ์ ์๋ ์ ๋์ค ๋ฆฌ๋ ์ค ๋ช ๋ น์ด ์ฌ์ ์ด๋ค. ์ผ๋ฐ ๋ช ๋ น์ด, ๋ฐ๋ชฌ ๋ฐ ์๋ฒ์ค์ , RPM & DEB, VI ์๋ํฐ, SVN & Git, ์ ์คํฌ๋ฆฝํธ ํ๋ก๊ทธ๋๋ฐ์ผ๋ก ๋ถ๋ฅํ์ฌ ์์ธํ ๋ค๋ฃฌ๋ค.
- https://terms.naver.com/list.naver?cid=59321&categoryId=59321
sudo apt-get update
sudo apt-get install build-essential
https://askubuntu.com/questions/398489/how-to-install-build-essential
sudo apt-get install software-properties-common
sudo apt update
sudo apt full-upgrade -y
// ํ์ค๋ก
sudo apt update && sudo apt full-upgrade -y
apt-cache search openjdk-17
apt-cache search ์ฐพ๊ณ ์ ํ๋๊ฑฐ ์ฐ๊ธฐ
- ์๋ฌ๋ด์ฉ
sudo pip3 install meson
error: externally-managed-environment
ร This environment is externally managed
โฐโ> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
- ํด๊ฒฐ๋ฐฉ๋ฒ
$python3 -m pip config set global.break-system-packages true
Writing to /home/g/.config/pip/pip.conf
Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).
To configure your current shell, you need to source
the corresponding env file under $HOME/.cargo.
This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh
source "$HOME/.cargo/env.fish" # For fish
-
meson ์ต์ ๋ฒ์ ผ์ ์ค์นํ๊ธฐ์ pip3์ค์นํด์ผํจ & ninja
sudo apt-get update
sudo apt-get -y install python3-pip
pip3 --version
sudo apt install build-essential
sudo apt install ninja-build
sudo apt remove -y meson
sudo pip3 install --upgrade meson
-
meson ์ฐ๋ ์์
-
https://www.linuxfromscratch.org/blfs/view/svn/general/glib2.html
meson build .
cd build
meson test
ninja
sudo ninja install
- cmake์ฐ๋ ์์
mkdir build
cd build
cmake ..
make
Clipboard ๋จนํต์ผ๋ ์ค์น[๐]
Vulkan Install(22.04)[๐]
sudo apt-get update
sudo apt-get -y install vulkan-tools
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.275-jammy.list https://packages.lunarg.com/vulkan/1.3.275/lunarg-vulkan-1.3.275-jammy.list
sudo apt update
sudo apt install vulkan-sdk
npm[๐]
nvm install --lts
Installing latest LTS version.
Downloading and installing node v20.11.0...
Downloading https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz...
############################################################################################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v20.11.0 (npm v10.2.4)
โฏ node --version
v20.11.0
-nodejs 18 ๋ฒ์ ผ ์ค์น
sudo apt update && sudo apt upgrade
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install nodejs
sudo apt-get install python3-pip
node.js ์ ๋ฐ์ดํธ(3๊ฐ์ ๋ช ๋ น์ด)|๐|
- node.js ์ ๋ฐ์ดํธ (3๊ฐ์ ๋ช ๋ น์ด๋ฅผ ์ฐจ๋ก์ฐจ๋ก ์ ๋ ฅํ์ธ์.)
sudo npm cache clean --force
sudo npm install -g n
sudo n stable
sudo n stable
installing : node-v22.17.0
mkdir : /usr/local/n/versions/node/22.17.0
fetch : https://nodejs.org/dist/v22.17.0/node-v22.17.0-linux-x64.tar.xz
copying : node/22.17.0
installed : v22.17.0 (with npm 10.9.2)
Note: the node command changed location and the old location may be remembered in your current shell.
old : /usr/bin/node
new : /usr/local/bin/node
If "node --version" shows the old version then start a new shell, or reset the location hash with:
hash -r (for bash, zsh, ash, dash, and ksh)
rehash (for csh and tcsh)
netstat ์์ผ๋ฉด ์ค์น[๐]
netstat
sudo apt update
sudo apt install net-tools -y
Valgrind ์ต์ ๋ฒ์ ผ ์ค์นํ๊ธฐ[๐]
//๋ค์ด ๋ฐ๊ณ ์์ถ ํ๊ณ
./configure
make
make install
// or
sudo make install
- Valgrind ์๋ฌ ํด๊ฒฐ
Nerd Font ์ค์น install[๐]
linux PATH[๐]
How To Set Your $path Variable In Linux
To make sure the user is following all of the steps, enable ash_profile. Setting the $PATH setting for all users on the system with the following command is as simple as that. Please navigate to vi /etc/profile.
vi /etc/profile
https://www.systranbox.com/how-to-set-path-in-kali-linux/
- A TUI system monitor written in Rust
cargo install ytop
- A network diagnostic tool
cargo install trippy
sudo apt-get update
์คํจ๋ก ์๋ฌด๊ฒ๋ ์ ๋ฐ์ดํธ ์๋ ๋
๋ฆด๋ฆฌ์ค๊ฐ ์๋ช
์ข
๋ฃ(EOL)์ ๋๋ฌํ ๊ฒฝ์ฐ "apt-get ์
๋ฐ์ดํธ< ์ค์ 404 ์ค๋ฅ๋ฅผ ๋ฐฉ์งํ๋ ค๋ฉด ๋ค์๊ณผ ๊ฐ์ด /etc/apt/sources.list๋ฅผ ์์ ํด์ผ ํฉ๋๋ค. /์ฝ๋>". CODENAME์ ์ฌ์ฉ ์ค์ธ Ubuntu ๋ฆด๋ฆฌ์ค์ ์ฝ๋๋ช
์ผ๋ก ๋ฐ๊พธ์ญ์์ค.
cd /etc/apt/souces.list.d
- [SOLVED] Update manager gets GPG error when trying to download repositorie]
Failed to fetch https://master.dl.sourceforge.net/project/d-apt/dists/d-apt/main/binary-amd64/Packages Certificate verifica
tion failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the
certificate verification. [IP: 2xx.1xx.3x.x2 xx3]
E: Some index files failed to download. They have been ignored, or old ones used instead.
-
์ด๊ฑฐ ํด๊ฒฐ https://groups.google.com/g/unimrcp/c/700XHJIaEp8?pli=1
-
์๊ฐ ์ ๋ง๋๊ฑธ๋ก ํด๊ฒฐ https://askubuntu.com/questions/1096930/sudo-apt-update-error-release-file-is-not-yet-valid
https://eehoeskrap.tistory.com/555
zig cc -o main.exe main.c -target x86_64-windows-gnu
zig cc ์๊ธฐ๋ค ใ
$ file main.exe
main.exe: PE32+ executable (console) x86-64, for MS Windows
$ ls
README.md build.sh delete.sh main.c main.exe main.pdb
$ zig cc -o main.exe main.c -target x86_64-windows-gnu
Compile C Objects [106/406] mingw_vsprintfw.c... /Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_wvfscanf.c:167:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
s->seen_eof = 1;
^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_wvfscanf.c:176:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
else s->seen_eof = 1;
^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_wvfscanf.c:1628:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
ifp.is_string = 1;
^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_vfscanf.c:158:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
s->seen_eof = 1;
^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_vfscanf.c:167:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
else s->seen_eof = 1;
^ ~
/Users/globalyoung/.zig/lib/libc/mingw/stdio/mingw_vfscanf.c:1629:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-con]
ifp.is_string = 1;
^ ~
Compile C Objects [175/406] wcstoumax.c... 3 warnings generated.
3 warnings generated.
eza ์ฌ์ฉ๋ฒ(exa์์ eza๋ก ๋์ด๊ฐ)[๐]
-
eza -la -TL2
ํธ๋ฆฌ๋ ์ฉ๋ ์ฒดํฌ
$ eza -la -TL2
drwxrwxrwx - y 26 Feb 12:17 .
drwxrwxrwx - y 13 Mar 15:29 โโโ .git
.rw-rw-rw- 92 y 26 Feb 11:42 โ โโโ config
.rw-rw-rw- 73 y 26 Feb 11:42 โ โโโ description
.rw-rw-rw- 23 y 26 Feb 11:42 โ โโโ HEAD
drwxr-xr-x - y 26 Feb 11:42 โ โโโ hooks
drwxr-xr-x - y 26 Feb 11:42 โ โโโ info
drwxrwxrwx - y 26 Feb 11:42 โ โโโ objects
drwxrwxrwx - y 26 Feb 11:42 โ โโโ refs
.rw-rw-rw- 8 y 26 Feb 11:42 โโโ .gitignore
drwxrwxrwx - y 26 Feb 12:17 โโโ .vscode
.rw-rw-rw- 1.9k y 26 Feb 12:17 โ โโโ launch.json
.rw-rw-rw- 154 y 26 Feb 11:42 โโโ Cargo.lock
.rw-rw-rw- 179 y 26 Feb 11:42 โโโ Cargo.toml
drwxrwxrwx - y 13 Mar 16:01 โโโ src
.rw-rw-rw- 2.0k y 7 Mar 10:27 โ โโโ lib.rs
.rw-rw-rw- 138 y 26 Feb 12:28 โ โโโ main.rs
drwxrwxrwx - y 26 Feb 11:54 โโโ target
.rw-rw-rw- 1.0k y 13 Mar 16:01 โโโ .rustc_info.json
.rw-rw-rw- 177 y 26 Feb 11:42 โโโ CACHEDIR.TAG
drwxrwxrwx - y 26 Feb 12:28 โโโ debug
drwxrwxrwx - y 26 Feb 11:54 โโโ nextest
- (eza)icons์ผ๋ก ์ด์๊ฒ ๋ณด๊ธฐ
eza --icons
eza --icons
๎ Cargo.lock ๎ Cargo.toml ๎ฟ src ๎ฟ target
file ์ฌ์ฉ๋ฒ[๐]
file
file ๋ค์ ํ์ผ๋ช ์ ๋๋ฅด๋ฉด ์ด๋ป๊ฒ ์คํ๋๊ณ ์์ธํ ์ฌํญ์ ์์ ์๋ค.
$ file a.out
a.out: Mach-O 64-bit executable arm64
$ ls
README.md a.out build.sh delete.sh main.c
$ zig cc main.c
$ file build.sh
build.sh: Bourne-Again shell script text executable, ASCII text
- ์ถ์ฒ: Using ZIG as a Drop-In Replacement C Compiler on Windows, Linux, and macOS!
uname ์ผ๋ก ๋ด ์ปดํจํฐ ์ฌ์ ๋ณด์ฌ์ค ๋ ๊ตฟ[๐]
$ uname -a
Darwin g-y-MacBookPro.local 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 arm64
bash ๋ช ๋ น์ด ํ์คํ ๋ฆฌ ๊ด๋ฆฌ - readline ์ฌ์ฉ๋ฒ ๋ฐ line ํธ์ง, reverse search ๋ฑ ๋จ์ถํค ์์ฝ[๐]
https://www.lesstif.com/system-admin/bash-readline-line-reverse-search-6717494.html
alias
์ฌ์ฉ ๋ฐฉ๋ฒ ๋ฑ๋ก & ์ญ์ [๐]
- ์ฉ๋ ๋ณด๊ธฐ ์ข๊ฒ MB๋ก ํ์ํด์ ๋ณด๊ธฐ
ls -lah
- ์ถ์ฒ: https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=khsmonad&logNo=220040189919
lsd
๎จ Cargo.lock ๎จ Cargo.toml ๏ examples ๏ LICENSE-MIT ๎ README.md ๏ resources ๏ก src ๏ target
lsd -a
๏ . ๎ .editorconfig ๎ฝ .github ๎จ Cargo.lock ๏ examples ๎ README.md ๏ก src
๏ .. ๎ป .git ๏ .gitignore ๎จ Cargo.toml ๏ LICENSE-MIT ๏ resources ๏ target
lsd -l
.rw-r--r-- globalyoung staff 31 KB Tue Sep 12 22:04:07 2023 ๎จ Cargo.lock
.rw-r--r-- globalyoung staff 725 B Tue Sep 12 22:03:49 2023 ๎จ Cargo.toml
drwxr-xr-x globalyoung staff 192 B Tue Sep 12 22:03:49 2023 ๏ examples
.rw-r--r-- globalyoung staff 1.0 KB Tue Sep 12 22:03:49 2023 ๏ LICENSE-MIT
.rw-r--r-- globalyoung staff 2.4 KB Tue Sep 12 22:03:49 2023 ๎ README.md
drwxr-xr-x globalyoung staff 160 B Tue Sep 12 22:03:49 2023 ๏ resources
drwxr-xr-x globalyoung staff 256 B Tue Sep 12 22:03:49 2023 ๏ก src
drwxr-xr-x globalyoung staff 160 B Tue Sep 12 22:04:21 2023 ๏ target
find๋ก ํ์ผ, ํด๋ ์ฐพ์์ ์ง์ฐ๊ธฐ[๐Top]
- ํ์ฌ ๋๋ ํ ๋ฆฌ ํ์์์ ๋๋ ํ ๋ฆฌ์ ์๋ ".DS_Store" ๋ชจ๋ ํ์ผ ์ญ์
find . -type f -name ".DS_Store" -exec rm {} \;
# fd-find(rust๋ก ๋ง๋ find) ํ์ฌ ๋๋ ํ ๋ฆฌ ํ์์์ ๋๋ ํ ๋ฆฌ์ ์๋ "justfile" ๋ชจ๋ ํ์ผ ์ญ์ (-exec๋ฅผ -x ๋ฐ๊พธ๋ ๋๋ค.)
fd justfile -x rm {} \;
https://gracefulprograming.tistory.com/86
find์์ ์ ๊ทธ๋ ์ด๋ ๋ fd (Rust๋ก ๋ง๋ฌ)[๐]
find๋ก ์คํํ์ผ๋ง ๊ฒ์ํ๊ธฐ[๐]
- LinuxOS
find . -type f -executable -print -exec rm {} \;
./main
- macOS
find . -type f -perm +111 -print
# ์คํํ์ผ๋ง ๊ฒ์ํด์ ๊ทธ๊ฒ๋ง ์ง์ฐ๊ธฐ
find . -type f -perm +111 -print -exec rm -rf {} \;
https://stackoverflow.com/questions/4458120/search-for-executable-files-using-find-command
find ์ฉ๋ ์์ผ๋ก ์ ๋ ฌํด์ ๊ณจ๋ผ์ ์ง์ฐ๊ธฐ[๐]
find ./* -type -f -name '*.jpg' -size +512k -size -1024k -exec rm -rf {} \;
# => ํ์ฌ ๊ฒฝ๋ก์ ํ์ผ ์ค์ ํ์ผ ํ์ฅ์๊ฐ jpg์ด๋ฉด์, ์ฌ์ด์ฆ๊ฐ 512kbyte ์ด์, 1024kbyte ์ดํ์ธ ๊ฒ๋ค์ ๋ชจ๋ ์ญ์ ํ๋ค.
-
์ถ์ฒ: https://nota.tistory.com/89 [nota's story:ํฐ์คํ ๋ฆฌ]
-
find function ๋ง๋ค์ด์ ๋ด ๋ง๋๋ก ๊ฒ์ํ๊ธฐ https://www.baeldung.com/linux/find-exec-command
์คํ ํ์ผ๋ง ๊ณจ๋ผ์ ์ง์ฐ๊ธฐ Makefile(delete execute file)[๐]
- macOS ```find . -type f -perm +111 -print -exec rm -rf {} \;```
- LinuxOS ```find . -type f -executable -print -exec rm {} \;```
- WindowsOS ```Get-ChildItem -Filter *.exe -Recurse -Force | Remove-Item -Recurse -Force```
```Makefile
clean:
find . -type f -perm +111 -print -exec rm -rf {} \;
rm:
find . -type f -executable -print -exec rm {} \;
find | grep์กฐํฉโค๏ธ๋ด ํด๋์์ ํ์ ํด๋๊น์ง ํ์ผ ์์ ๋ด๊ฐ ์ํ๋ "println" ๋ค์ด๊ฐ ํ์ผ๋ช ๊ณผ ๋ช๋ฒ์งธ ์ค์ธ์ง ๋ค ๋์ค๊ฒ ๋จ์ด ์ฐพ๊ธฐ[๐]
- ๋ด ํด๋์์ ํ์ ํด๋๊น์ง ํ์ผ ์์ ๋ด๊ฐ ์ํ๋ "println" ๋ค์ด๊ฐ ํ์ผ๋ช ๊ณผ ๋ช๋ฒ์งธ ์ค์ธ์ง ๋ค ๋์ค๊ฒ ๋จ์ด ์ฐพ๊ธฐ
find . | grep -winr -C 4 "println"
-
grep ์ฌ์ฉ๋ฒ
-
๋ด๊ฐ ๊ณต๋ถํ๋ ค๊ณ ์ ๋ฆฌ https://economiceco.tistory.com/m/15604
fdfind(fd) & ripgrep(rg) ์กฐํฉ[๐]
- fdfind(fd) ํ์ผ๋ช ์ฐพ๊ธฐ
main.rs
ํ์ผ ์ฐพ๊ธฐ
fdfind main.rs
fd main.rs
- ์จ๊ธด ํ์ผ ์ฐพ๊ธฐ
fdfind -H ".DS_Store"
https://github.com/sharkdp/fd/blob/master/doc/screencast.svg
.DS_Store
ํ์ผ ์ฐพ์์ ์ง์ฐ๊ธฐ
fd -H '^\.DS_Store$' -tf -X rm
- ripgrep(rg)
- "main" ๋ค์ด๊ฐ ํ์ผ์์ชฝ ๊ธ์ ์ฐพ๊ธฐ
rg -i main
cmd
๊ด๋ฆฌ์ ๊ถํ ์คํ์ผ๋ก ๋์ค์ฐฝ์ ์ฌ์ญ์์
๋ค์์ diskpart ๋ผ๋ ๋ช
๋ น์ ๋ด๋ฆฝ๋๋ค.
list disk ๋ผ๋ ๋ช
๋ น์ผ๋ก ์ปดํจํฐ์ ๋ถ์ด ์๋ ํ๋ ๋ฆฌ์คํธ๋ฅผ ํ์ธ(๋ฒํธ)ํฉ๋๋ค.
select disk ๋ฒํธ (์ง์ฐ๊ณ ์ ํ๋ ๋์คํฌ ๋ฒํธ) ์
๋ ฅํฉ๋๋ค.
clean
detail disk
exit
https://superuser.com/questions/158255/what-is-hd0-and-sda-sdb-in-linux
- Rocky linux 9 https://forums.rockylinux.org/t/how-to-install-nvidia-driver-and-cuda-on-rocky-9-1/9686
https://developer.nvidia.com/cuda-downloads
๋ฅ๋ฌ๋์ ์ํ NVIDIA-Driver ์ค์น 2ํธ - Quick Guides https://youtu.be/xCeB5hQnDF0
-
UEFI SEcure Boot Settings https://docs.nvidia.com/networking/display/BlueFieldSWv36011699/UEFI+Secure+Boot
-
Cuda Version https://tkayyoo.tistory.com/17
- Nvidia 3060ti(Cuda11.4) https://forums.developer.nvidia.com/t/cuda-10-2-or-cuda-11-0-for-rtx3060/170757/3
-
nvidia-smi
nvidia-smi
Thu Jul 27 08:17:28 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.199.02 Driver Version: 470.199.02 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A |
| 0% 32C P8 18W / 220W | 176MiB / 7973MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1214 G /usr/lib/xorg/Xorg 64MiB |
| 0 N/A N/A 1518 G /usr/bin/gnome-shell 110MiB |
+-----------------------------------------------------------------------------+
gpustat
gpustat -i
watch -d -n 0.5 nvidia-smi
watch -d -n 0.5 nvidia-smi
์ถ์ฒ : https://wscode.tistory.com/116
- https://forums.rockylinux.org/t/how-to-install-nvidia-driver-and-cuda-on-rocky-9-1/9686/2
- https://www.linuxcapable.com/how-to-install-nvidia-drivers-on-rocky-linux/
Rocky 9 Linux [๐]
- Obs Studio install https://idroot.us/how-to-install-obs-studio-on-rocky-linux-9/
- apt ๋น์ท
dnf install
๋ด๊ฐ ๋ง๋ Shell check ํ๊ธฐ[๐]
version check[๐]
cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
..
..
..
- neofetch (์ปดํฐ ๋ด ์ฌ์ ํ์ธ ํ๋์ ๋ค ๋ค์ด์จ๋ค. ๊ตฟ) https://github.com/dylanaraps/neofetch
./neofetch
RockyLinux 9 ๋ช ๋ น์ด ์ ๋ฆฌ[๐]
https://docs.rockylinux.org/books/admin_guide/03-commands/
Screen ๋ช ๋ น์ด ์ ๋ฆฌ ~~~~~~~[๐]
- https://erwinousy.medium.com/screen-command-%EC%82%AC%EC%9A%A9%EB%B2%95-linux-mac-62bf5dd23110
- https://man7.org/linux/man-pages/man1/screen.1.html#top_of_page
// Ctrl + a
์ปค๋ฉํธ ํ ๋ tmux ์ฒ๋ผ
๋๋ฌ์ฃผ๊ณ ๋ค์ ๋ช
๋ น ์น๋ฉด ๋๋ค
// ๋์๋ง
Ctrl + a ?
//์ฐฝ ์๋ก ๋ง๋ค๊ธฐ
Ctrl + a c
//์ฐฝ ์๋ก ๋ง๋ listํ์ธ
Ctrl + a โ
//์ฐฝ ์ ํ ๋ง๋ ์ฐฝ ์ ํ
Ctrl + a 0
0
1
2
//์ฐฝ ์๋ก ๋ง๋ listํ์ธ
Ctrl + a โ
์ด๊ฑธ๋ก ๋ง๋ bash ํ๋ฉด ํ์ธ ํ๋ฉด ๋๋ค
//์ฐฝ ์ฐฝbufer Kill ํ์ธ
Ctrl + a K
- ๋๋ ์ฐฝ ์ ํ
// ์ฐฝ sp๋ก ๋๋๊ธฐ ์ข์ฐ. ํ์ดํ ํ์ฉ
Ctrl + a |
or
Ctrl + a :split -v
// โค๏ธ๋๋๊ฑฐ ์ฐฝ ์ ํโค๏ธ tap
Ctrl + a tap
// ์ํ vs. (๋๋ฌธ์S)
Ctrl + a S
or
Ctrl + a :split
// ๋๋ ์ฐฝ ์์ ๊ธฐ
Ctrl + a :remove
or
Ctrl + a , x
https://economiceco.tistory.com/m/16169
https://superuser.com/questions/243459/unix-how-to-unsplit-in-screen
[Linux] tmux ์ฌ์ฉ๋ฒ ~~~~~~~~~[๐]
-
tmux ์ธํ
-
tmux ๊ตฌ์ฑ ์์
- session: ์ฌ๋ฌ ์๋์ฐ๋ก ๊ตฌ์ฑ
- window: ํฐ๋ฏธ๋ ํ๋ฉด, ์ธ์ ๋ด์์ ํญ์ฒ๋ผ ์ฌ์ฉ ๊ฐ๋ฅ
- pane: ํ๋์ ์๋์ฐ ๋ด์์์ ํ๋ฉด ๋ถํ
-
session ๊ด๋ จ ๋ช ๋ น์ด
# ์๋ก์ด ์ธ์
์์ฑ
tmux new -s (session_name)
# ์ธ์
๋ง๋ค๋ฉด์ ์๋์ฐ๋ ๊ฐ์ด ์์ฑ
tmux new -s (session_name) -n (window_name)
# ์ธ์
์ข
๋ฃ
exit
# ์ธ์
๋ชฉ๋ก
tmux ls
# ์ธ์
๋ค์ ์์ํ๊ธฐ(๋ค์ ๋ถ๋ฌ์ค๊ธฐ)
tmux attach -t session_number
# ์ธ์
์ค๋จํ๊ธฐ
(ctrl + b) d
# ์คํฌ๋กคํ๊ธฐ
ctrl + b + [
# ํน์ ์ธ์
๊ฐ์ ์ข
๋ฃ
tmux kill-session -t session_number
์๋์ฐ ๊ด๋ จ ๋ช
๋ น์ด
# ์ ์๋์ฐ ์์ฑ
(ctrl + b) c
# ์ ์๋์ฐ ์ด๋
(ctrl + b) b (์ซ์)
ํ ๊ด๋ จ ๋ช
๋ น์ด
# ํ ๋๋๊ธฐ
(ctrl + b) % #์ข์ฐ๋ก ๋๋๊ธฐ
(ctrl + b) " #์์๋๋ก ๋๋๊ธฐ
# ํ๋ผ๋ฆฌ ์ด๋ํ๊ธฐ
(ctrl + b) ๋ฐฉํฅํค
(ctrl + b) q
(ctrl + b) o #์์๋๋ก ์ด๋
# ํ ์ญ์
(ctrl + d)
# ํ ์ฌ์ด์ฆ ์กฐ์
(ctrl + b) : resize_pane -L 10 #L,R,U,D ์
๋ ฅํ๋ฉด ์ํ์ข์ฐ๋ก ์กฐ์ ๋จ
(ctrl + b) (alt) ๋ฐฉํฅํค
# ๋จ์ถํค ๋ชฉ๋ก
(ctrl + b) ?
https://velog.io/@ur-luella/tmux-%EC%82%AC%EC%9A%A9%EB%B2%95
ubuntu Linux ~~~~~~~~~~~~[๐]
Nvidia ์ค์น๋ฅผ ์ํด Exit The X Server[๐]
- ์ด๊ฑฐ์ธ๋ฏ
https://www.systranbox.com/how-to-exit-the-x-server-on-a-linux-machine/
sudo service lightdm stop
lsof ํฌํธ ์ฃฝ์ด๊ธฐ[๐]
- 8000 ํฌํธport ๊ฒ์
lsof -i :7999
- ์ฌ์ฉ์ค์ธ ํฌํธ ์ฃฝ์ด๊ธฐ
kill -9 pid์ฐ๋ฉด ๋จ
netstat -ntlp
GRUB(GRand Unified Bootloader๊ฒ์ํ๋ค๊ฐ ์๊ฒ ๋จ. [๐]
- ๋ฆฌ๋ ์ค ์์คํ ๋ถํ ํ๋ก์ธ์ค(๋ฆฌ๋ ์ค ๋ถํ ๊ณผ์ ) ๏ปฟ -https://yonlog.tistory.com/59
Linux sed ์ฌ์ฉ๋ฒ[๐]
https://www.lesstif.com/lpt/linux-sed-6979751.html
- Advanced macOS Command-Line Tools
ip ํ์ธ[๐]
// To run the alternative to the ifconfig utility, type in this command:
ip a
https://www.makeuseof.com/fix-ifconfig-command-not-found-error-linux/
ip a
๋ช ๋ น์ด ์ตํ๊ธฐ https://www.cyberciti.biz/faq/linux-ip-command-examples-usage-syntax/
๋ค๋ฅธ ์ฌ๋์ ๋ฆฌ๋ ์คCommand ์ ๋ฆฌ ์๋ฃ[๐]
lsb_release -a
์๋์ฐ ๊ด๋ จ & ๋ฆฌ๋ ์ค ๊ฒน์น๋ ๋ด์ฉ shell[๐]
https://github.com/YoungHaKim7/Shell_Script
sudo apt ๋ง์ด ์ฐ๋๊ฑฐ ์ ๋ฆฌ[๐]
- ์ค์น ๊ฐ๋ฅํ ํจํค์ง ๋ฆฌ์คํธ๋ฅผ ์ต์ ํ
sudo apt update
- ํ์ฌ ๋ฆฌ์คํธ ๋ถ๋ฌ์ค๊ธฐ
sudo apt list
- ํ์ฌ ์ค์น๋ ๋ฆฌ์คํธ ์ค์์ ์ ๊ทธ๋ ์ด๋๊ฐ ํ์ํ ๋ชฉ๋ก
sudo apt list --upgradable
- ์ค์น๊ฐ ํ์ํ ๋ฆฌ์คํธ๋ฅผ ํ์ธํ๋ค๋ฉด upgrade๋ช ๋ น์ด๋ฅผ ํตํด ์ค์ ์ ๋ฐ์ดํธ๋ฅผ ๊ฐ๋ฅ
sudo apt upgrade
- Use 'sudo apt autoremove' to remove them (The following packages were automatically installed and are no longer required: libfwupdplugin1 libxmlb1) ๋ถํ์ํ๊ฒ ์๋ค๊ณ ์ฒดํฌ๋๊ฑฐ ์๋์ผ๋ก ์ญ์ ํ๊ธฐ
sudo apt autoremove
apt search & install & remove[๐]
sudo apt search elastic
sudo apt install elastic
remove & purge ์ฐจ์ด[๐]
$ sudo apt remove <ํจํค์ง๋ช
>
ํจํค์ง๋ฅผ ์ญ์ ํ๋ค. ํ์ง๋ง ์ค์ ํ์ผ์ ๋จ๊ฒจ๋๋ค.
$ sudo apt purge <ํจํค์ง๋ช
>
ํจํค์ง๋ฅผ ์ญ์ ํ๋ค. ์ค์ ํ์ผ๋ ํจ๊ป ์ญ์ ํ๋ค.
https://gintrie.tistory.com/23
Command Line Crash Course | freeCodeCamp.org[๐]
๊ฒฐ๊ตญ์ Linux command๋ฅผ ์ธ์์ผํจ[๐]
Cd Ls (dos์์ dir์ด๋ ๋๊ฐ์)
- The Linux command line for beginners|Ubuntu Ctrl+F๋ก ๋น ๋ฅด๊ฒ ์ฐพ์!! https://ubuntu.com/tutorials/command-line-for-beginners#2-a-brief-history-lesson
WindowsOS ์คํ ์ฐฝ์์ (๋จ์ถํค win+R)[๐]
//์๋์ฐ ํฐ๋ฏธ๋
wt.exe
windowsterminal.exe
// ํ์์
powershell.exe
pwsh.exe
Linux ๋ช ๋ น์ด๋ ๋ชจ๋ ์๋ฌธ์[๐]
- ํ์ฌ์ฌ์ฉํ๊ณ ์๋ ๋์ ๊ณ์ ์ ๋ณด ํ์ธํ๊ธฐ
whoami
pwd[๐]
- ํ์ฌ ์ํน ๋๋ ํ ๋ฆฌ ํ์ํด์คthe pwd command will tell you exactly what the current working directory is.
pwd
cd ์์ ๋๋ ํ ๋ฆฌ ๋ณ๊ฒฝ[๐]
- You can change the working directory using the cd command, an abbreviation for โchange directoryโ. Try typing the following:
//root๋ก ๊ฐ๊ธฐ
cd
cd ..
// ์ด๋ ๊ฒ ๋ถํ๋๋จ
cd ../../..
- cd ..
ํด๋์์ ๋๊ฐ๊ธฐ
Test/123 > cd ..
Test
cd ../../
2๋ฒ ์ฐ๋ฉด 2๊ฐ๋ฅผ ์ฐ์์ผ๋ก ๋๊ฐ ์ ์๋ค.
cd ..
cd ..
์ด๋ ๊ฒ ํ๋๋ฐ ใ
ใ
ใ
cd ../../
์ด๋ฐ ์ข์ ๋ฐฉ๋ฒ์ด!!
๋ฆฌ๋ ์ค๋ ์ฐ๋ฆฌ๋๋ผ ๋ ๋ชจ์์ด ์๋๋ผ / forward ์. - ์ด๊ฑฐ ๊ณจํ ๋ง์ด ๋จน์๋๋ฐ ใ ใ Note that the directory separator is a forward slash (โ/โ), not the backslash that you may be used to from Windows or DOS systems
rm[๐]
- ํ์ผ ์ง์ฐ๊ธฐ
rm
rm -rf ํด๋๋ช
ํด๋ ์ง์ธ๋๋ -rf ๋ถํ์ผํจ
rm -r ํด๋๋ช
ํด๋์ ํ์ผ์ด ์์ด๋ ๊ฐ์ ๋ก ๋ค ์ง์์ค ์ต๊ณ !!!
touch[๐]
- ํ์ผ ๋ง๋ค๊ธฐ
touch test.txt
touch test.txt
์๋์์ touch๊ฐ์ ๊ธฐ๋ฅ ๊ตฌํํ๊ธฐ[๐]
- ๋์ shell์ฐธ์กฐ
์๋์ฐ์์๋WindowsOS ์คํ์ผ
$ echo $null >> hello.c
hello.c ํ์ผ ๋ง๋ค๊ธฐ https://github.com/YoungHaKim7/Ada_Lang
mkdirํด๋ ๋ง๋ค๊ธฐ[๐]
mkdir test testํด๋ ๋ง๋ค์ด์ง rmdir test testํด๋ ์ง์์ง
rmdirํด๋ ์ง์ฐ๊ธฐ[๐]
// ๋ง์ด ์ ์จ๋ด์ ์ ๋ชจ๋ฅด๊ฒ ์
rmdir
move[๐]
= mv ํ์ผ๋ช ๋ฐ๊พธ๊ธฐ
move test.js new_test.js
ํ์นธ ๋์ฐ๊ธฐ ํด์ผ ๋ช
๋ น์ด ๋จน์
move test.js test/new_test.js
// mv๋ฅผ ๋ง์ด ์
mv test.js new_test.js
// ์ฌ๋ฌ๊ฐ ํ์ผ์ ๋ค๋ฅธ ํด๋๋ก ์ฎ๊ธฐ๋ ๋ฐฉ๋ฒ ์ญ ๋์ดํ๊ณ ๋งจ ๋ง์ง๋ง์ ํ์ผ์ด ๋๋ ํด๋๋ ์ง์ ํด์ฃผ๋ฉด ์ฎ๊ฒจ์ง๋ค. ๊ตฟ!
mv <file> <file> <file> <file> <Target:Folder>
- mv ์ธ์ ์ ๊ท์์ ์ด์ฉํ ๋ฐฉ๋ฒ๋ ์๋ค. https://discourse.ubuntu-kr.org/t/topic/15388
move test.js test/new_test.js mv test.js test/new_test.js
test_main % mv ../test/src/test01 src test_main % cp ../test/src/main.rs src test_main ํด๋๋ก ํด๋์ ํ์ผ์ ๋ฐ๋ฆฌ๊ณ ์ค๊ธฐ test_mainํด๋์์ ๋ค๋ฅธ ๋๋ ํ ๋ฆฌ์ ์๋ ํ์ผ์ด ๊ฐ์ง๊ณ ์ค๊ธฐ ใ
ใ
์ต๊ณ !! ํต์งธ๋ก ๋ค ๊ฐ์ง๊ณ ์ด. ์ด๋๊ณผ ์นดํผ๋ฅผ ํ์์ srcํด๋๋ก move์ copy๋ฅผ ํ์์.
cp ํด๋ ๊ฐ์ ๋ก ๋ง๋ค๊ธฐ ์ข๋ค ใ ใ โค๏ธ - https://economiceco.tistory.com/m/15199
clearํ๋ฉด ๊นจ๋์ด ํ๊ธฐ[๐]
cd g
๋๋ ํ ๋ฆฌ๋ช
์ฒซ ๊ธ์ง๋ง ๋๋ฅด๊ณ ํญ ๋๋ฅด๋ฉด ํด๋๋ช
์๋ ์์ฑ๋จ ๋๋ฐ ํธํจ
ls
Dos์ dir
ls -l
ls ls -f
ls -l ls -a ls -R ls ..
ls
๋ช ๋ น์ด ํ๊ธ๋ก ์์ธํ ๋ณด๊ธฐ http://www.ktword.co.kr/test/view/view.php?m_temp1=6054
sudo[๐]
root๊ถํ์ผ๋ก ํ์ผ ์ค์น ํ ๋ ์ ์๋์ฐ์ Admin๊ณ์ ๊ถํ์ผ๋ก ์ดํด!!!
๋ฆฌ๋ ์ค ์ฉ๋ํ์ธ[๐]
df -h
mv ls์ต์ ๋ช ๋ น์ด ์ ์ ๋ฆฌ๋จ.[๐]
Linux and Unix mv command tutorial with examples | George Ornbo
Last updated Wednesday, Jan 8, 2020 Linux and Unix mv command tutorial with examples Tutorial on using mv, a UNIX and Linux command to move or rename files. Examples of moving a file, moving multiple files, moving a directory, prompting before overwriting
shapeshed.com
ํฐ๋ฏธ๋์์ ๋ชจ๋ ํ๋ก์ธ์ค kill[๐]
- ์ฐ์ ํฐ๋ฏธ๋์ ์ด๊ณ ๋ชจ๋ ํ๋ก์ธ์ค๋ฅผ kill ํด์ค๋๋ค.
$ sudo killall apt apt-get
symbol link๋ง๋ค๊ธฐ ๋จ์ถ์์ด์ฝ ๋ง๋ค์ด์ ํธํ๊ฒ ์ด๋[๐]
์ฌ๋ณผ๋ฆญ ๋งํฌ๋ ์๋ ๋ช
๋ น์ด๋ก ๋ง๋ค์ ์๋ค.
ln -s TARGET(์๋ณธ) LINK_NAME(๋งํฌ์ด๋ฆ)
์ถ์ฒ : https://hong00.tistory.com/80
tree[๐]
https://leevisual.tistory.com/75
- 2 ๊น์ด ๊น์ง๋ง ๋ค์ด๊ฐ๋ค. ๊ตฟ
tree -L 2
์ต์
|
์๋ฏธ
|
๊ธฐํ
|
-d
|
๋๋ ํ ๋ฆฌ๋ง ๋ฆฌ์คํธ
|
1-1๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-a
|
๋ชจ๋ ํ์ผ ๋ฆฌ์คํธ
|
1-2๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-f
|
ํ์๋๋ ํ์ผ์ ์ ์ฒด๊ฒฝ๋ก ํ์
|
1-3๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-L
|
๋๋ ํ ๋ฆฌ depth ์ค์
|
1-4๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-P
|
ย |
1-5๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-I
|
ย |
1-6๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
--prune
|
ํ
๋น ๋๋ ํ ๋ฆฌ ๋ฆฌ์คํธ ์ํจ.
|
1-7๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-p
|
ํ์ผ์ ํ์
๋ฐ ํผ๋ฏธ์
์ถ๋ ฅ
|
1-8๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-u
|
์ฌ์ฉ์(username) ์ถ๋ ฅ
|
1-9๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-h
|
ํ์ผ์ ์ฌ์ด์ฆ ์ถ๋ ฅ (human readable)
|
1-10๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-s
|
ํ์ผ์ ์ฌ์ด์ฆ ์ถ๋ ฅ
|
1-11๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
--du
|
๋๋ ํ ๋ฆฌ์ ๋ํ ์ค์ ํฌ๊ธฐ ์ถ๋ ฅ
|
1-12๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
-o
|
์ถ๋ ฅ์ ํ์ผ๋ก ์ ์ก
|
1-13๋ฒ ํญ๋ชฉ ์ฐธ์กฐ
|
- ์ถ์ฒ : https://leevisual.tistory.com/75
[Linux] scp ๋ช ๋ น์ด๋ก (๋ก์ปฌโ์๋ฒ) ํ์ผ ์ ์ก| by Heejin Do[๐]
-
ํ์ผ ์ ์ก scp
์ธ๊ตญ ์ฌ๋์ ๋ฆฌ๋
์ค ๋ช
๋ น์ด ์ ๋ฆฌ
[๐]
https://github.com/ethanflower1903/linux-command
๊ด๋ จ eBook์ฑ ์ ๋ฃ$[๐]
eBook)๋ฆฌ๋ ์ค ์ ๋ฌธ์๋ฅผ ์ํ ๋ช ๋ น์ด ์ฌ์ : ์ฐ๋ถํฌ, ๋ฐ๋น์, CentOS, ํ๋๋ผ ๋์ [ PDF ] - https://economiceco.tistory.com/m/11390
echo ๋ก unicode ์ถ๋ ฅํ๊ธฐ[๐]
- https://stackoverflow.com/questions/602912/how-do-you-echo-a-4-digit-unicode-character-in-bash
- LinuxOS๊ธฐ์ค
% echo -e '\u2620' # \u takes four hexadecimal digits
โ
% echo -e '\U0001f602' # \U takes eight hexadecimal digits
๐
catํ์ฉ๋ฒ[๐]
# ํ์ผ ๋ฏธ๋ฆฌ ๋ณด๊ธฐ
cat main.rs
# vim์๋ํฐ๋ ๋ชป ์ฐ๋ ํ๊ฒฝํด์ ๊ธํ๊ฒ ์ฐ๋ ๋ฒ ์ข๋ค
cat > main.c
# ๋ด๊ฐ ๋ฃ๊ณ ์ถ์ ์ฝ๋ ๋ฃ๊ณ
# Ctrl + D ํ๋ฉด ์ ์ฅ๋จ. ๋๋ฐ
- ์ฝ์์์ eof ์ ๋ ฅํ๊ณ ์ถ์ผ์๋ฉด ctrl d ๋๋ฅด์๊ณ ์ํฐํ๋ฉด๋จ.(EOF๊ฐ Ctrl+D์ธ๊ฐ๋ณด๋ค ๊ตฟ)
curl์ฌ์ฉ๋ฒ[๐]
-
curl ์ด๋? https://curl.se/docs/manpage.html
- curl์ Client Url ์ด๋ ์๋ฏธ๋ก ํด๋ผ์ด์ธํธ์์ url์ ์ฌ์ฉํด์ ์๋ฒ์ ๋ฐ์ดํฐ๋ฅผ ์ก์์ ํ๋ ๋ช ๋ น์ด ํด์ด๋ค.
- Linux, MacOS, Window ๋ฑ ๋ค์ํ ํ๊ฒฝ์์ HTTP, HTTPS, SMTP, TELNET, FTP, LDAP ๋ฑ ๋ค์ํ ํ๋กํ ์ฝ์ ์ง์ํ์ฌ ํต์ ํ๊ฒฝ์์ ์์ฃผ ์ฐ์ธ๋ค.
-
-H
-X
๋ค์ ์ด๋ฐ ์ต์ ๋ค ๋ถํ๋ฉด ๋๋ค.
$ curl -h
Usage: curl [options...] <url>
-d, --data <data> HTTP POST data
-f, --fail Fail fast with no output on HTTP errors
-h, --help <category> Get help for commands
-i, --include Include protocol response headers in the output
-o, --output <file> Write to file instead of stdout
-O, --remote-name Write output to a file named as the remote file
-s, --silent Silent mode
-T, --upload-file <file> Transfer local FILE to destination
-u, --user <user:password> Server user and password
-A, --user-agent <name> Send User-Agent <name> to server
-v, --verbose Make the operation more talkative
-V, --version Show version number and quit
This is not the full help, this menu is stripped into categories.
Use "--help category" to get an overview of all categories.
For all options use the manual or "--help all".
$ curl --help category
Usage: curl [options...] <url>
auth Different types of authentication methods
connection Low level networking operations
curl The command line tool itself
dns General DNS options
file FILE protocol options
ftp FTP protocol options
http HTTP and HTTPS protocol options
imap IMAP protocol options
misc Options that don't fit into any other category
output Filesystem output
pop3 POP3 protocol options
post HTTP Post specific options
proxy All options related to proxies
scp SCP protocol options
sftp SFTP protocol options
smtp SMTP protocol options
ssh SSH protocol options
telnet TELNET protocol options
tftp TFTP protocol options
tls All TLS/SSL related options
upload All options for uploads
verbose Options related to any kind of command line output of curl
- ๋ฆฌ๋
์ค ์ธ๋ถ ์ ์ IP ํ์ธ (curl ifconfig.me)_๋ด ์์ดํผ ์์๋ด๊ธฐ(
curl ifconfig.me
)
$ curl ifconfig.me
148.83.73.113
GNU ๋ฐ์ด๋๋ฆฌ ์ ํธ๋ฆฌํฐ|๐|
- GNU Binutilsย ๋งฅ์ OS X๊ฑด,ย ๋ฆฌ๋
์ค ๊ฑด, ๊ฐ๋ฐ์ย ํ๋ค ๋ณด๋ฉด ๋๋ฒ๊น
ํ ์ผ์ด ์๊ธฐ๊ฒ ๋ง๋ จ์ด๋ค. ๋๋ฒ๊น
์ ์ ์ฉํ ๋๊ตฌ์ค ํ๋๊ฐย GNU ๋ฐ์ด๋๋ฆฌ ์ ํธ๋ฆฌํฐ(GNUย Binutils)์ด๋ค.
- GNU ๋ฐ์ด๋๋ฆฌ ์ ํธ๋ฆฌํฐ๋ ์ฌ๋ฌ ์ข ๋ฅ์ ์ค๋ธ์ ํธ ํ์ผ ํ์๋ค์ ์กฐ์ํ๊ธฐ ์ํ ํ๋ก๊ทธ๋๋ฐ ๋๊ตฌ ๋ชจ์์ธ๋ฐ,ย ์ด๋ค์ ์ผ๋ฐ์ ์ผ๋ก GCC, make, GDB์ ํจ๊ป ์ฌ์ฉํ๊ฒ ๋๋ค.
as - ์ด์
๋ธ๋ฌ
ld - ๋ง์ปค
addr2line - ์ฃผ์๋ฅผ ํ์ผ๊ณผ ์ค๋ก ๋ฐ๊พผ๋ค.
ar - ์์นด์ด๋ธ(์์ถ) ํ์ผ์ ๋ง๋ค๊ณ , ์์ ํ๊ณ , ํด์ ํ๋ค.
c++filt - ๋งน๊ธ๋ง๋ C++ ์ฌ๋ณผ๋ค์ ์๋๋๋ก ๋๋๋ฆฐ๋ค.
nm - ์ค๋ธ์ ํธ ํ์ผ์ ์ฌ๋ณผ์ ์ถ๋ ฅํ๋ค.
objcopy - ์ค๋ธ์ ํธ ํ์ผ์ ๋ณต์ฌํ๋ค.
objdump - ์ค๋ธ์ ํธ ํ์ผ์ ๋ํ ์ ๋ณด๋ฅผ ์ถ๋ ฅํ๋ค.
ranlib - ์์นด์ด๋ธ(์์ถ)๋ฅผ ์ํ ์์ธ์ ๋ง๋ ๋ค.
readelf - ELF ํ์ผ์ ๋ด์ฉ์ ์ถ๋ ฅํ๋ค.
size - ์ ์ฒด์ ๋ถ๋ถ์ ํฌ๊ธฐ๋ฅผ ์ถ๋ ฅํ๋ค.
strings - ํ์ํ ์ ์๋ ๋ฌธ์์ด์ ์ถ๋ ฅํ๋ค.
strip - ์ค๋ธ์ ํธ ํ์ผ๋ก๋ถํฐ ์ฌ๋ณผ์ ์ ๊ฑฐํ๋ค.
gprof - ํ๋กํ์ผ๋ฌ
์ถ์ฒ: https://techlog.gurucat.net/263 [์ ์์ค๋๋์ Tech & Life:ํฐ์คํ ๋ฆฌ]
- readelf-like tool for Mac OS X? [closed]
readelf -r app
Relocation section '.rel.dyn' at offset 0x5ec contains 2 entries:
Offset Info Type Sym.Value Sym. Name
08049d58 00001706 R_386_GLOB_DAT 00000000 __gmon_start__
08049d60 00000305 R_386_COPY 08049d60 _ZSt4cout
Relocation section '.rel.plt' at offset 0x5fc contains 13 entries:
Offset Info Type Sym.Value Sym. Name
08049d24 00000107 R_386_JUMP_SLOT 0804868c print
08049d28 00000207 R_386_JUMP_SLOT 0804869c _ZNSt8ios_base4InitC1E
08049d2c 00000507 R_386_JUMP_SLOT 080486ac _ZStlsISt11char_traits
08049d30 00000607 R_386_JUMP_SLOT 080486bc _ZNSolsEPFRSoS_E
08049d34 00000707 R_386_JUMP_SLOT 08048664 _init
08049d38 00000807 R_386_JUMP_SLOT 080486dc sleep
08049d3c 00000907 R_386_JUMP_SLOT 080486ec _ZNKSsixEj
08049d40 00000b07 R_386_JUMP_SLOT 080486fc _ZNKSs4sizeEv
08049d44 00000c07 R_386_JUMP_SLOT 0804870c __libc_start_main
08049d48 00000d07 R_386_JUMP_SLOT 08048ae4 _fini
08049d4c 00001307 R_386_JUMP_SLOT 0804872c _ZSt4endlIcSt11char_tr
08049d50 00001507 R_386_JUMP_SLOT 0804873c __gxx_personality_v0
08049d54 00001607 R_386_JUMP_SLOT 0804874c _ZNSt8ios_base4InitD1E
ํฐ๋ฏธ๋์์ ์ฐ๋ ๊ณ์ฐ๊ธฐ(qalc)C++๋ก ๋ง๋ฌ|๐|
-
macOS
brew install qalculate-gtk
-
Qalculate! library and CLI
-
์์
-
Basic functions and operators
sqrt 4 = sqrt(4) = 4^(0.5) = 4^(1/2) = 2
sqrt(25; 16; 9; 4) = [5 4 3 2]
sqrt(32) = 4 ร โ(2) (in exact mode)
cbrt(โ27) = root(-27; 3) = โ3 (real root)
(โ27)^(1/3) โ 1.5 + 2.5980762i (principal root)
ln 25 = log(25; e) โ 3.2188758
log2(4)/log10(100) = log(4; 2)/log(100; 10) = 1
5! = 1 ร 2 ร 3 ร 4 ร 5 = 120
5\2 = 5//2 = trunc(5 / 2) = 2 (integer division)
5 mod 3 = mod(5; 3) = 2
52 to factors = 2^2 ร 13
25/4 ร 3/5 to fraction = 3 + 3/4
gcd(63; 27) = 9
sin(pi/2) โ cos(pi) = sin(90 deg) โ cos(180 deg) = 2
sum(x; 1; 5) = 1 + 2 + 3 + 4 + 5 = 15
sum(\i^2+sin(\i); 1; 5; \i) = 1^2 + sin(1) + 2^2 + sin(2) + ... โ 55.176162
product(x; 1; 5) = 1 ร 2 ร 3 ร 4 ร 5 = 120
var1:=5 (stores value 5 in variable var1) var1 ร 2 = 10
5^2 #this is a comment = 25
sinh(0.5) where sinh()=cosh() = cosh(0.5) โ 1.1276260
plot(x^2; โ5; 5) (plots the function y=x^2 from -5 to 5)
- Units
5 dm3 to L = 5 dm^3 to L = 5 L
20 miles / 2h to km/h = 16.09344 km/h
1.74 to ft = 1.74 m to ft โ 5 ft + 8.5039370 in
1.74 m to -ft โ 5.7086614 ft
100 lbf ร 60 mph to hp โ 16 hp
50 ฮฉ ร 2 A = 100 V
50 ฮฉ ร 2 A to base = 100 kgยทmยฒ/(sยณยทA)
10 N / 5 Pa = (10 N)/(5 Pa) = 2 mยฒ
5 m/s to s/m = 0.2 s/m
500 โฌ โ 20% to $ โ $451.04
500 megabit/s ร 2 h to b?byte โ 419.09516 gibibytes
- Physical constants
k_e / G ร a_0 = (coulombs_constant / newtonian_constant) ร bohr_radius โ 7.126e9 kgยทHยทm^โ1
โ / (ฮป_C ร c) = planck โ (compton_wavelength ร speed_of_light) โ 9.1093837e-31 kg
5 ns ร rydberg to c โ 6.0793194E-8c
atom(Hg; weight) + atom(C; weight) ร 4 to g โ 4.129e-22 g
(G ร planet(earth; mass) ร planet(mars; mass))/(54.6e6 km)^2 โ 8.58e16 N (gravitational attraction between earth and mars)
- Uncertainty and interval arithmetic
"ยฑ" can be replaced with "+/-"; result with interval arithmetic activated is shown in parenthesis
sin(5ยฑ0.2)^2/2ยฑ0.3 โ 0.460ยฑ0.088 (0.46ยฑ0.12)
(2ยฑ0.02 J)/(523ยฑ5 W) โ 3.824ยฑ0.053 ms (3.825ยฑ0.075 ms)
interval(โ2; 5)^2 โ interval(โ8.2500000; 12.750000) (interval(0; 25))
- Algebra
(5x^2 + 2)/(x โ 3) = 5x + 15 + 47/(x โ 3)
(\a + \b)(\a โ \b) = ("a" + "b")("a" โ "b") = 'a'^2 โ 'b'^2
(x + 2)(x โ 3)^3 = x^4 โ 7x^3 + 9x^2 + 27x โ 54
factorize x^4 โ 7x^3 + 9x^2 + 27x โ 54 = x^4 โ 7x^3 + 9x^2 + 27x โ 54 to factors = (x + 2)(x โ 3)^3
cos(x)+3y^2 where x=pi and y=2 = 11
gcd(25x; 5x^2) = 5x
1/(x^2+2xโ3) to partial fraction = 1/(4x โ 4) โ 1/(4x + 12)
x+x^2+4 = 16 = (x = 3 or x = โ4)
x^2/(5 m) โ hypot(x; 4 m) = 2 m where x > 0 = (x โ 7.1340411 m)
cylinder(20cm; x) = 20L (calculates the height of a 20 L cylinder with radius of 20 cm) = (x = (1 / (2ฯ)) m) = (x โ 16 cm)
asin(sqrt(x)) = 0.2 = (x = sin(0.2)^2) = (x โ 0.039469503)
x^2 > 25x = (x > 25 or x < 0)
solve(x = y+ln(y); y) = lambertw(e^x)
multisolve([5x=2y+32, y=2z, z=2x]; [x, y, z]) = [โ32/3 โ128/3 โ64/3]
dsolve(diff(y; x) โ 2y = 4x; 5) = 6e^(2x) โ 2x โ 1
- Calculus
diff(6x^2) = 12x
diff(sinh(x^2)/(5x) + 3xy/sqrt(x)) = (2/5) ร cosh(x^2) โ sinh(x^2)/(5x^2) + (3y)/(2 ร โ(x))
integrate(6x^2) = 2x^3 + C
integrate(6x^2; 1; 5) = 248
integrate(sinh(x^2)/(5x) + 3xy/sqrt(x)) = 2x ร โ(x) ร y + Shi(x^2) / 10 + C
integrate(sinh(x^2)/(5x) + 3xy/sqrt(x); 1; 2) โ 3.6568542y + 0.87600760
limit(ln(1 + 4x)/(3^x โ 1); 0) = 4 / ln(3)
- Matrices and vectors
[1, 2, 3; 4, 5, 6] = ((1; 2; 3); (4; 5; 6)) = [1 2 3; 4 5 6] (2ร3 matrix)
1...5 = (1:5) = (1:1:5) = [1 2 3 4 5]
(1; 2; 3) ร 2 โ 2 = [(1 ร 2 โ 2), (2 ร 2 โ 2), (3 ร 2 โ 2)] = [0 2 4]
[1 2 3].[4 5 6] = dot([1 2 3]; [4 5 6]) = 32 (dot product)
cross([1 2 3]; [4 5 6]) = [โ3 6 โ3] (cross product)
[1 2 3; 4 5 6].ร[7 8 9; 10 11 12] = hadamard([1 2 3; 4 5 6]; [7 8 9; 10 11 12]) = [7 16 27; 40 55 72] (hadamard product)
[1 2 3; 4 5 6] ร [7 8; 9 10; 11 12] = [58 64; 139 154] (matrix multiplication)
[1 2; 3 4]^-1 = inverse([1 2; 3 4]) = [โ2 1; 1.5 โ0.5]
- Statistics
mean(5; 6; 4; 2; 3; 7) = 4.5
stdev(5; 6; 4; 2; 3; 7) โ 1.87
quartile([5 6 4 2 3 7]; 1) = percentile((5; 6; 4; 2; 3; 7); 25) โ 2.9166667
normdist(7; 5) โ 0.053990967
spearman(column(load(test.csv); 1); column(load(test.csv); 2)) โ โ0.33737388 (depends on the data in the CSV file)
- Time and date
10:31 + 8:30 to time = 19:01
10h 31min + 8h 30min to time = 19:01
now to utc = "2020-07-10T07:50:40Z"
"2020-07-10T07:50CET" to utc+8 = "2020-07-10T14:50:00+08:00"
"2020-05-20" + 523d = addDays(2020-05-20; 523) = "2021-10-25"
today โ 5 days = "2020-07-05"
"2020-10-05" โ today = days(today; 2020-10-05) = 87 d
timestamp(2020-05-20) = 1 589 925 600
stamptodate(1 589 925 600) = "2020-05-20T00:00:00"
"2020-05-20" to calendars (returns date in Hebrew, Islamic, Persian, Indian, Chinese, Julian, Coptic, and Ethiopian calendars)
- Number bases
52 to bin = 0011 0100
52 to bin16 = 0000 0000 0011 0100
52 to oct = 064
52 to hex = 0x34
0x34 = hex(34) = base(34; 16) = 52
523<<2&250 to bin = 0010 1000
52.345 to float โ 0100 0010 0101 0001 0110 0001 0100 1000
float(01000010010100010110000101001000) = 1715241/32768 โ 52.345001
floatError(52.345) โ 1.2207031e-6
52.34 to sexa = 52ยฐ20โฒ24โณ
1978 to roman = MCMLXXVIII
52 to base 32 = 1K
sqrt(32) to base sqrt(2) โ 100000
0xD8 to unicode = ร
code(ร) to hex = 0xD8
linux์์ ์ฐ๋ ๊ทธ๋ฆผํ ๊ฐ์๊ฑฐ & VSCode์ Draw.io)|๐|
- https://xournalpp.github.io/
- VSCode extension(Draw.io Integration)
cmake ์ต์ ํ ์ค์น|๐|
- https://cmake.org/download/
- ์์ถ ํ๊ณ cmakeํด๋ ๋ค์ด๊ฐ์
./bootstrap && make && sudo make install
# ๋ณ๋ ฌ ์คํ
make -j `nproc`
-
make -j
๋ณ๋ ฌ https://young-cow.tistory.com/28
Cmake์ ๋ฐ์ดํธ ํ๊ธฐ[๐]
Cmake option์ต์ ์ค์ [๐]
-
์ต์ ํ cmake๊ฐ ์ค์น๋๋ ์์น
$ which cmake
/usr/local/bin/cmake
$ cmake --version
cmake version 4.1.0
gcc ์ต์ ํ ์ค์น|๐|
mkdir builld && cd build
./configure --host=x86_64-pc-linux-gnu
# ์ฐ๋ ๋ 8๊ฐ ์จ์ ๋น ๋ฅด๊ฒ
make -j 8
ํ์ผ์ (hash)ํด์๊ฐ ํ์ธํ๊ธฐ(md5, sha1, ํ์ผ ๊ฒ์ฆ&๋ณ์กฐ ํ์ธ)|๐|
$ md5sum ./text_hash.txt
0082745f92a2881b2edaadc0f9e44289 ./text_hash.txt
$ sha1sum ./text_hash.txt
afaf2153d3e0be3bdf3cbd7533ae7602b510b1bd ./text_hash.txt
์ฐ๋ถํฌ(Ubuntu)์ฉ (๋ฐฉ์ก์ฉ) ScreenKey(๋นVim ํ๋๊ฑฐ ๋ณด์ฌ์ค๋ ์ข๋ค.)|๐|
# install
sudo apt install screenkey
# kill process
killall screenkey
find
์ mv
์ ์กฐํฉ์ผ๋ก ์ด๋ ์ํค๊ธฐ|๐|
find -type f -execdir mv "{}" ../ \;
[Linux] ๋ฆฌ๋ ์ค cp ๋ช ๋ น์ด / ํ์ผ, ๋๋ ํ ๋ฆฌ ๋ณต์ฌ|๐|
man sudo_root
๊ณต๋ถํด ๋ณด์|๐|
man sudo_root