Skip to content

YoungHaKim7/linux_command

Repository files navigation

link



『유닉스 리눅스 명령어 사전』의 개정판- linux command총정리

  • 『유닉스 리눅스 명령어 사전』의 개정판. 빠르게 찾아 쉽게 활용할 수 있는 유닉스 리눅스 명령어 사전이다. 일반 명령어, 데몬 및 서버설정, RPM & DEB, VI 에디터, SVN & Git, 쉘 스크립트 프로그래밍으로 분류하여 자세히 다룬다.
  • https://terms.naver.com/list.naver?cid=59321&categoryId=59321

How to install build-essential? [duplicate]

sudo apt-get update
sudo apt-get install build-essential

https://askubuntu.com/questions/398489/how-to-install-build-essential

How to add PPA on Ubuntu?

sudo apt-get install software-properties-common

update

sudo apt update
sudo apt full-upgrade -y

// 한줄로

sudo apt update && sudo apt full-upgrade -y 

apt 찾기

apt-cache search openjdk-17

apt-cache search 찾고자 하는거 쓰기


Linux Command 많이 쓰는거

IMG_8383


Rust Install

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

Cmake다음 버젼 meson 이제는 meson으로 넘어가나?

sudo apt-get update

sudo apt-get -y install python3-pip


pip3 --version

sudo apt install build-essential

sudo apt install ninja-build

meson install(Successfully installed meson-1.3.2)

sudo apt remove -y meson
sudo pip3 install --upgrade meson
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

 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

Cmake업데이트 하기[🔝]

netstat 없으면 설치[🔝]

  • netstat
sudo apt update
sudo apt install net-tools -y

Valgrind 최신 버젼 설치하기[🔝]

//다운 받고 압축 풀고
./configure

make

make install
// or
sudo make install

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/


linux에서 윈도우 실행하기


Rust로 만든 CPU 감시 ytop

  • A TUI system monitor written in Rust
cargo install ytop

Rust로 만든 네트워크 top 같은거

  • A network diagnostic tool
cargo install trippy

오류 해결 History

릴리스가 수명 종료(EOL)에 도달한 경우 "apt-get 업데이트< 중에 404 오류를 방지하려면 다음과 같이 /etc/apt/sources.list를 수정해야 합니다. /코드>". CODENAME을 사용 중인 Ubuntu 릴리스의 코드명으로 바꾸십시오.

cd /etc/apt/souces.list.d 
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.

tar압축 해제 & 압축하기

https://eehoeskrap.tistory.com/555

zig cc 맥에서 윈도우 파일 만들기 ㅋ 컴파일 하는 방법 ㅋ

  • 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
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

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 사용 방법 등록 & 삭제[🔝]

https://withcoding.com/121

ls 사용법

  • 용량 보기 좋게 MB로 표시해서 보기
ls -lah

lsd 사용법

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

https://github.com/lsd-rs/lsd


find로 파일, 폴더 찾아서 지우기[🔝Top]

  • 현재 디렉토리 하위에서 디렉토리에 있는 ".DS_Store" 모든 파일 삭제
find . -type f -name ".DS_Store" -exec rm {} \; 

https://shutcoding.tistory.com/entry/LINUX-FIND-%EB%A1%9C-%ED%8C%8C%EC%9D%BC%ED%8F%B4%EB%8D%94-%EC%B0%BE%EA%B8%B0-%EC%A7%80%EC%9A%B0%EA%B8%B0

https://gracefulprograming.tistory.com/86

find에서 업그레이드 된 fd (Rust로 만듬)[🔝]

https://github.com/sharkdp/fd

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 이하인 것들을 모두 삭제한다.

실행 파일만 골라서 지우기 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"

fdfind(fd) & ripgrep(rg) 조합[🔝]

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

rg -i main

Disk (WindowsOS) 파티션 이게 최고 ㅎ

  • cmd

관리자 권한 실행으로 도스창을 여십시요

다음에 diskpart 라는 명령을 내립니다.

list disk 라는 명령으로 컴퓨터에 붙어 있는 하드 리스트를 확인(번호)합니다.

select disk 번호 (지우고자 하는 디스크 번호) 입력합니다.

clean

detail disk

exit

grub관련

https://superuser.com/questions/158255/what-is-hd0-and-sda-sdb-in-linux


Nvidia CUDA Install

https://developer.nvidia.com/cuda-downloads

딥러닝을 위한 NVIDIA-Driver 설치 2편 - Quick Guides https://youtu.be/xCeB5hQnDF0

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 |
+-----------------------------------------------------------------------------+

GPU 상태 실시간 확인하기(gpustat & watch)

  • gpustat
gpustat -i
  • watch -d -n 0.5 nvidia-smi
watch -d -n 0.5 nvidia-smi

출처 : https://wscode.tistory.com/116



Rocky 9



Rocky 9 Linux [🔝]

Rocky Linux 9 ~~~~~~

  • apt 비슷
dnf install 

내가 만든 Shell check 하기[🔝]

https://www.shellcheck.net/

version check[🔝]

cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
..
..
..
./neofetch

RockyLinux 9 명령어 정리[🔝]

https://docs.rockylinux.org/books/admin_guide/03-commands/




Screen 명령어 정리 ~~~~~~~[🔝]

// 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쓰면 됨

GRUB(GRand Unified Bootloader검색하다가 알게 됨. [🔝]

Linux sed 사용법[🔝]

https://www.lesstif.com/lpt/linux-sed-6979751.html

macOS




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/


다른 사람의 리눅스Command 정리 자료[🔝]

Linux Version 체크linux

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

https://tttap.tistory.com/130

  • 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


https://codingdog.tistory.com/entry/%EC%9A%B0%EB%B6%84%ED%88%AC-apt-search-%EB%AA%85%EB%A0%B9%EC%96%B4%EB%A5%BC-%EC%9D%B4%EC%9A%A9%ED%95%B4%EC%84%9C-%ED%8C%A8%ED%82%A4%EC%A7%80%EB%A5%BC-%EC%B0%BE%EC%95%84%EB%B4%85%EC%8B%9C%EB%8B%A4

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이랑 똑같음)

WindowsOS 실행 창에서 (단축키 win+R)[🔝]

//윈도우 터미널
wt.exe
windowsterminal.exe


// 파워셀
powershell.exe
pwsh.exe

Linux 명령어는 모두 소문자[🔝]

whoami

  • 현재사용하고 있는 나의 계정 정보 확인하기
whoami
  • 현재 워킹 디렉토리 표시해줌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 -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>
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

https://velog.io/@devmin/%EB%A6%AC%EB%88%85%EC%8A%A4%EC%97%90%EC%84%9C-%EB%8B%A4%EB%A5%B8-%EB%93%9C%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%A1%9C-%EA%B2%BD%EB%A1%9C-%EC%9D%B4%EB%8F%99%ED%95%98%EA%B8%B0

mv ls옵션 명령어 잘 정리됨.[🔝]

https://shapeshed.com/unix-mv/#:~:text=What%20is%20the%20mv%20command,are%20new%20than%20the%20destination.

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번 항목 참조

[Linux] scp 명령어로 (로컬↔서버) 파일 전송| by Heejin Do[🔝]

외국 사람의 리눅스 명령어 정리linuxjs[🔝]

https://github.com/ethanflower1903/linux-command

관련 eBook책 유료$[🔝]

eBook)리눅스 입문자를 위한 명령어 사전 : 우분투, 데비안, CentOS, 페도라 대응 [ PDF ] - https://economiceco.tistory.com/m/11390

echo 로 unicode 출력하기[🔝]

% 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 등 다양한 프로토콜을 지원하여 통신 환경에서 자주 쓰인다.
  • https://sasca37.tistory.com/279

  • -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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published