반응형
✅ 리눅스 기본 명령어 정리1️⃣ 파일 & 디렉토리 관리현재 위치 확인pwd디렉토리 이동cd/home/koras02 # 절대 경로 이동cd.. # 상위 디렉토리cd ~ # 홈디렉토리파일/폴더 목록 확인ls # 목록보기ls -l # 상세보기 (권한, 소유자, 크기, 날짜)ls -a # 숨김파일 포함2️⃣ 파일/디렉토리 조작새 디렉토리 만들기mkdir testdirmkdir -p dir1/dir2 # 종합 디렉토리 생성삭제하기rm file.txt # 파일 삭제rm -r dir1 # 디렉토리 삭제rm -rf dir2 # 강제 삭제 (주의!)복사하기cp p1.txt p2.txt # 파일 복사cp -r dir dir2 # 디렉토리 복사파일 이름 변경mv p1.txt hello.txt # 파일 이름 변경mv h..
✅ 1. 변수 선언 키워드타입스크립트는 JS와 마찬가지로 var, let, const를 지원하나, 타입을 지정할 수 있습니다 let 재할당 가능함블록 스코프( { } 내부 범위에 한정함 )let keyword: string = 'Action';keyword = 'Horror'; // ✅ 가능console.log(keyword); // Horrorconst 재할당 불가능상수(변하지 않는 값) 지정const pi: number = 3.14;pi = 3.14159; // ❌ 에러var함수 스코프최신 Typescript/JS에서는 가급적 사용을 지양함var km: number = 1.5;km = 1.7; // ✅ 가능const fixedNum1: string = km.toFixed(2);console.log(..
✅ 1. 기본 개념NestJS에서 의존성 주입(DI)은 클래스(Controller, Service 등)가 직접 객체를 생성하지 않고, IoC 컨테이너가 NestJS에서 필요한 인스턴스를 대신 생성해 주입하는 방식입니다. @Injectable() 데코레이터가 붙은 클래스는 NestJS가 관리하는 Provider로 등록됩니다. ✅ 2. Controller -> Service 주입// user.service.tsimport { Injectable } from "@nestjs/common";@Injectable()export class UsersService { getUsers() { return ["user1", "user2"]; }}// user.controller.tsimport { Contr..
✅ 1. Angular 템플릿이란?Angular 템플릿은 컴포넌트의 UI(View)를 정의하는 구조로 단순 HTML 뿐만 아닌 Angular 문법을 이용합니다.데이터 표시이벤트 처리조건/반복 렌더링스타일/클래스 동적 적용컴포넌트 클래스에 정의된 변수와 메서드에 연동 ng generate component user// user.component.tsimport { Component } from '@angular/core';@Component({ selector: 'app-user', templateUrl: './user.component.html',})export class UserComponent { name = 'Angular';}// app-routing-module.tsimport { Rout..
✅ 1. 폴더 구조먼저 GraphQL 서버를 만들어 커스텀 타입을 만들기 위해 새로운 폴더를 만들어줍니다. GraphQL 스키마를 붙이기전 서버의 틀만 먼저 만든다고 가정해보겠습니다.graphql-custom-type/├── package.json├── index.js # 서버 메인 코드└── node_modules/const express = require("express");const { graphqlHTTP } = require("express-graphql");const { GraphQLSchema } = require("graphql");const app = express();const schema = new GraphQLSchema({});app.use( "/graphql", ..
✅ 1. 배열 구조 분해배열 구조 분해는 배열의 값을 순서대로 변수에 담을 수 있습니다.const arr = [1, 2, 3];const [x, y] = arr;console.log(x); // 1console.log(y); // 2 기본값을 지정할 수도 있습니다 (값이 없을 경우 대체)// 기본 값 지정 (값이 없을 때 대체)const arr = [10];const [a, b = 20] = arr;console.log(a); // 10;console.log(b); // 20; 값을 건너뛰고 필요한 것만을 가져올 수 있습니다.const arr = [1, 2, 3, 4];const [first, , third] = arr;console.log(first); // 1console.log(third); // ..
🐧 Linux 가상머신 1️⃣ 가상머신(VM)을 통해 설치하기가상머신은 PC 안에 또 다른 컴퓨터를 만드는 방식으로 VirtualBox또는 VMWare를 통해 설치할 수 있습니다. 1. 가상화 지원 확인 BIOS에서 Intel VT-x 또는 AMD-V가 켜저 있는지 확인 Windows 기능에 들어가 Hyper-V 끄기2. 가상머신 프로그램 설치VirtualBox(무료) 다운로드: https://www.virtualbox.org/wiki/DownloadsVMware Player(비상업 무료) 다운로드: https://www.vmware.com/products/desktop-hypervisor/workstation-and-fusion3. Linux ISO 이미지 다운로드Ubuntu: https://ubun..
📌 Linux 란?1️⃣ Linux의 개념 Linux는 운영체제(OS) 가 아닌 운영체제의 핵심인 커널(Kernel)을 말하며, 이 커널 위 여러 프로그램(Shell, Desktop enviroment, Tools)을 얹어 일명 배포판(Distribution, Distro)라고 부릅니다. 👉 즉 Linux 커널 + 유틸리티 + 패키지 관리 시스템 + GUI(옵션) = Ubuntu, Debian, Kali, Fedora 같은 "리눅스 배포판"을 말함2️⃣ Linux 커널 (Kernel)Linux Kenel(커널)은 하드웨어와 소프트웨어를 이어주는 핵심 장치로 주 역할은 다음과 같습니다.주요 역할:CPU, 메모리, 디스크, 네트워크 등 자원 관리프로세스 실행 및 스케줄링드라이버 관리사용자 프로그래은 커널..
📙 1. 델리게이트 (Delegate)델리게이트(Delegate)는 메서드를 참조하는(가리킬 수 있는) 타입으로 메서드 포인터 같은 역할을 담당합니다, 특정 메서드 대신 호출하거나, 메서드를 변수처럼 전달할 때 사용합니다. 기본적인 문법은 다음과 같습니다.// 델리게이트 선언public delegate void MyDelegate(string message);// 클래스 선언class Program{ static void Main() { // 델리게이트 변수에 메서드 등록 MyDelegate myDel = printMessage; // 호출 myDel("Hello Delegate!"); } static void printMessag..
🐧 리눅스 배우기 1️⃣ 입문 단계 (기초 다지기)리눅스가 무엇인가? (커널, 배포판, CLI/GUI 차이)가상머신/WSL로 리눅스 설치 -> Ubuntu 추천함기본 명령어 익히기ls, pwd, cd, mkdir, rm, cp, mv, cat, less 등 파일 권한: ls -l, chmod, chown패키지 관리 배우기 (Ubuntu 기준 apt)sudo apt update, sudo apt install 2️⃣ 초급 단계 (시스템 이해)사용자/그룹 관리 adduser, usermod, groups, sudo프로세스/서비스 다루기ps, top, htop, kill, systemctl 네트워크 기초ping, curl, wget, netstat, ss에디터 배우기 (nano -> vim/zsh)쉘 환경 ..