<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>스크립트 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/tag/%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Tue, 25 Nov 2025 16:03:54 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://lycos7560.com/wp-content/uploads/2022/11/cropped-cropped-cropped-log-1-150x150-1-80x80.png</url>
	<title>스크립트 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Ubuntu에 Gemini CLI 설치</title>
		<link>https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/</link>
					<comments>https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Tue, 25 Nov 2025 16:02:48 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[$\text{apt}$]]></category>
		<category><![CDATA[$\text{GEMINI\_API\_KEY}$]]></category>
		<category><![CDATA[$\text{npm install -g}$]]></category>
		<category><![CDATA[$\text{npm uninstall}$]]></category>
		<category><![CDATA[$\text{string-width}$]]></category>
		<category><![CDATA[$v$ flag]]></category>
		<category><![CDATA[$v$ 플래그]]></category>
		<category><![CDATA[AI Assistant]]></category>
		<category><![CDATA[AI Chatbot]]></category>
		<category><![CDATA[AI Tool]]></category>
		<category><![CDATA[AI Workflows]]></category>
		<category><![CDATA[AI 워크플로우]]></category>
		<category><![CDATA[AI 툴]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[API Key]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Clean Up]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[CLI Tips]]></category>
		<category><![CDATA[CLI Tool]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Command Line Interface]]></category>
		<category><![CDATA[Commands]]></category>
		<category><![CDATA[compatibility]]></category>
		<category><![CDATA[Console Application]]></category>
		<category><![CDATA[Dependencies]]></category>
		<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Dev Tips]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Development Environment]]></category>
		<category><![CDATA[environment-variable]]></category>
		<category><![CDATA[Error Fix]]></category>
		<category><![CDATA[Frontend]]></category>
		<category><![CDATA[Full Stack]]></category>
		<category><![CDATA[GCP]]></category>
		<category><![CDATA[Gemini 2.5 Pro]]></category>
		<category><![CDATA[Gemini AI]]></category>
		<category><![CDATA[Gemini CLI]]></category>
		<category><![CDATA[Gemini Pro]]></category>
		<category><![CDATA[Gemini Quick Start]]></category>
		<category><![CDATA[Generative AI]]></category>
		<category><![CDATA[Global Install]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Cloud]]></category>
		<category><![CDATA[Google Gemini]]></category>
		<category><![CDATA[How to Install]]></category>
		<category><![CDATA[Installation Guide]]></category>
		<category><![CDATA[Invalid regular expression flags]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Large Language Model]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Development]]></category>
		<category><![CDATA[Linux OS]]></category>
		<category><![CDATA[Linux Setup]]></category>
		<category><![CDATA[LLM]]></category>
		<category><![CDATA[Node Version]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[Node.js Upgrade]]></category>
		<category><![CDATA[Node.js 호환성]]></category>
		<category><![CDATA[Nodejs v18]]></category>
		<category><![CDATA[Nodejs v20]]></category>
		<category><![CDATA[npm]]></category>
		<category><![CDATA[nvm]]></category>
		<category><![CDATA[NVM Install]]></category>
		<category><![CDATA[NVM 설치]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OS Setup]]></category>
		<category><![CDATA[Package Manager]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Step-by-Step]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[SyntaxError]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tech Trends]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[TUTORIAL]]></category>
		<category><![CDATA[Ubuntu Development]]></category>
		<category><![CDATA[Ubuntu Guide]]></category>
		<category><![CDATA[Ubuntu Server]]></category>
		<category><![CDATA[Uninstall Node]]></category>
		<category><![CDATA[Version Management]]></category>
		<category><![CDATA[Zsh]]></category>
		<category><![CDATA[개발 트렌드]]></category>
		<category><![CDATA[개발 팁]]></category>
		<category><![CDATA[개발 환경]]></category>
		<category><![CDATA[개발 효율]]></category>
		<category><![CDATA[개발자]]></category>
		<category><![CDATA[거대 언어 모델]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[구글 제미나이]]></category>
		<category><![CDATA[기술]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[단계별 가이드]]></category>
		<category><![CDATA[루트 권한]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리눅스 개발]]></category>
		<category><![CDATA[명령어]]></category>
		<category><![CDATA[버전 관리]]></category>
		<category><![CDATA[버전 문제]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[빠른 시작]]></category>
		<category><![CDATA[생성형 AI]]></category>
		<category><![CDATA[설치 가이드]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[시스템 정리]]></category>
		<category><![CDATA[오류 해결]]></category>
		<category><![CDATA[오픈소스]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[의존성]]></category>
		<category><![CDATA[인공지능]]></category>
		<category><![CDATA[인공지능 비서]]></category>
		<category><![CDATA[인증]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[전역 설치]]></category>
		<category><![CDATA[정규 표현식]]></category>
		<category><![CDATA[제미나이]]></category>
		<category><![CDATA[챗봇]]></category>
		<category><![CDATA[콘솔 앱]]></category>
		<category><![CDATA[클라우드 컴퓨팅]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[튜토리얼]]></category>
		<category><![CDATA[패키지 매니저]]></category>
		<category><![CDATA[패키지 제거]]></category>
		<category><![CDATA[프로그래밍]]></category>
		<category><![CDATA[환경 변수]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40364</guid>

					<description><![CDATA[<p>1단계: Node.js 및 npm 설치 (1) NVM (Node Version Manager)을 이용한 설치 (추천) (2) apt를 통한 기본 설치 2단계: Gemini CLI 설치 3단계: Gemini CLI 실행 및 인증 설치가 완료되면, 터미널에 gemini 명령어를 입력하여 실행 최초 실행 시 다음과 같은 설정 및 인증 과정이 진행됩니다. 인증이 성공적으로 완료되면, Gemini CLI 프롬프트(gemini &#62;)가 나타나며 바로 Gemini를 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/">Ubuntu에 Gemini CLI 설치</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-c8e0bf3e      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1단계-nodejs-및-npm-설치" class="uagb-toc-link__trigger">1단계: Node.js 및 npm 설치</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-nvm-node-version-manager을-이용한-설치-추천" class="uagb-toc-link__trigger">(1) NVM (Node Version Manager)을 이용한 설치 (추천)</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#2-apt를-통한-기본-설치" class="uagb-toc-link__trigger">(2) apt를 통한 기본 설치</a></li></ul></li><li class="uagb-toc__list"><a href="#2단계-gemini-cli-설치" class="uagb-toc-link__trigger">2단계: Gemini CLI 설치</a><li class="uagb-toc__list"><a href="#3단계-gemini-cli-실행-및-인증" class="uagb-toc-link__trigger">3단계: Gemini CLI 실행 및 인증</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">1단계: Node.js 및 npm 설치</h2>



<ul class="wp-block-list">
<li>Gemini CLI는 <strong>Node.js 버전 20 이상</strong>을 권장</li>
</ul>



<h3 class="wp-block-heading">(1) NVM (Node Version Manager)을 이용한 설치 (추천)</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Node.js 20 이상인지 확인
node -v
npm -v

// NVM 설치 (버전 번호는 최신 버전으로 바뀔 수 있음):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

// 터미널 재시작 또는 적용:
source ~/.bashrc 
# 또는 새 터미널 창을 엽니다.

// 최신 LTS Node.js 설치:
nvm install --lts
nvm use --lts</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">(2) <code>apt</code>를 통한 기본 설치</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Node.js 20 이상인지 확인
node -v
npm -v

sudo apt update
sudo apt install -y nodejs npm</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">2단계: Gemini CLI 설치</h2>



<ul class="wp-block-list">
<li>Node.js와 npm이 준비되었다면, npm을 사용하여 Gemini CLI를 <strong>전역으로</strong> 설치</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo npm install -g @google/gemini-cli</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">3단계: Gemini CLI 실행 및 인증</h2>



<p>설치가 완료되면, 터미널에 <code>gemini</code> 명령어를 입력하여 실행</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">gemini</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<p>최초 실행 시 다음과 같은 설정 및 인증 과정이 진행됩니다.</p>



<ol start="1" class="wp-block-list">
<li><strong>테마 선택:</strong> 터미널에서 원하는 CLI <strong>테마</strong>를 선택합니다.</li>



<li><strong>인증 방법 선택:</strong>
<ul class="wp-block-list">
<li><strong>Google 로그인 (권장):</strong> <br>개인 Google 계정으로 로그인하여 사용합니다. <br>브라우저 창이 열리면 로그인 및 인증을 완료하세요. <br>무료 등급에서는 Gemini 2.5 Pro 모델에 대한 충분한 요청 횟수(예: 분당 60회, 일일 1,000회)가 제공됩니다.</li>



<li><strong>API 키 사용:</strong> <br>Google AI Studio 등에서 발급받은 <strong>API 키</strong>를 사용하려면 환경 변수로 설정하거나 이 옵션을 선택합니다. <br>(예: <code>export GEMINI_API_KEY="YOUR_API_KEY"</code>)</li>
</ul>
</li>
</ol>



<p>인증이 성공적으로 완료되면, Gemini CLI 프롬프트(<code>gemini &gt;</code>)가 나타나며 바로 Gemini를 사용할 수 있습니다.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1500" height="611" src="https://lycos7560.com/wp-content/uploads/2025/11/image.png" alt="" class="wp-image-40365" srcset="https://lycos7560.com/wp-content/uploads/2025/11/image.png 1500w, https://lycos7560.com/wp-content/uploads/2025/11/image-300x122.png 300w, https://lycos7560.com/wp-content/uploads/2025/11/image-768x313.png 768w" sizes="(max-width: 1500px) 100vw, 1500px" /><figcaption class="wp-element-caption">성공</figcaption></figure>



<p></p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/">Ubuntu에 Gemini CLI 설치</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/ubuntu%ec%97%90-gemini-cli-%ec%84%a4%ec%b9%98/40364/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[Linux] 리눅스 커널 및 버전 정보 확인 명령어</title>
		<link>https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/</link>
					<comments>https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/#comments</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Tue, 14 Oct 2025 20:33:58 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[/etc/issue]]></category>
		<category><![CDATA[/etc/os-release]]></category>
		<category><![CDATA[/proc]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[ArchLinux]]></category>
		<category><![CDATA[arm64]]></category>
		<category><![CDATA[armv7l]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Boot]]></category>
		<category><![CDATA[boot_messages]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[CPU_info]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[diagnostics]]></category>
		<category><![CDATA[disk_info]]></category>
		<category><![CDATA[dmesg]]></category>
		<category><![CDATA[dnf]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[hardware_info]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[hostnamectl]]></category>
		<category><![CDATA[i386]]></category>
		<category><![CDATA[info_script]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[kernel_release]]></category>
		<category><![CDATA[kernel_version]]></category>
		<category><![CDATA[less]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux_commands]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[lsb_release]]></category>
		<category><![CDATA[lscpu]]></category>
		<category><![CDATA[memory_info]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[network_info]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[OS_info]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[platform]]></category>
		<category><![CDATA[Processor]]></category>
		<category><![CDATA[procfs]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[SUSE]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[system_check]]></category>
		<category><![CDATA[system_information]]></category>
		<category><![CDATA[system_logs]]></category>
		<category><![CDATA[system_script]]></category>
		<category><![CDATA[systemd]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[uname]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[x86_64]]></category>
		<category><![CDATA[yum]]></category>
		<category><![CDATA[가상화]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[관리자]]></category>
		<category><![CDATA[권한]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데스크탑]]></category>
		<category><![CDATA[로그인]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[릴리스]]></category>
		<category><![CDATA[메모리]]></category>
		<category><![CDATA[메모리정보]]></category>
		<category><![CDATA[명령어]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[문제해결]]></category>
		<category><![CDATA[버전]]></category>
		<category><![CDATA[부팅]]></category>
		<category><![CDATA[부팅메시지]]></category>
		<category><![CDATA[서버]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[스토리지]]></category>
		<category><![CDATA[시스템관리]]></category>
		<category><![CDATA[시스템로그]]></category>
		<category><![CDATA[시스템점검]]></category>
		<category><![CDATA[시스템정보]]></category>
		<category><![CDATA[아키텍처]]></category>
		<category><![CDATA[운영체제]]></category>
		<category><![CDATA[운영체제정보]]></category>
		<category><![CDATA[진단]]></category>
		<category><![CDATA[커널]]></category>
		<category><![CDATA[커널릴리스]]></category>
		<category><![CDATA[커널버전]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[패키지]]></category>
		<category><![CDATA[프로세서]]></category>
		<category><![CDATA[플랫폼]]></category>
		<category><![CDATA[하드웨어]]></category>
		<category><![CDATA[호스트명]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40334</guid>

					<description><![CDATA[<p>🔥[Linux] 리눅스 커널 및 버전 정보 확인 명령어 1️⃣ 커널 버전 확인 uname 명령어 리눅스 시스템과 커널 정보를 확인할 때 쓰이는 아주 기본적인 도구 옵션 정리 옵션 설명 예시 -r 커널 버전만 출력 (release) 5.15.0-88-generic -v 커널 릴리스 정보 출력 (version) #90-Ubuntu SMP Fri Jul 14 00:44:00 UTC 2023 -s 커널 이름 출력 (system) Linux [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/">[Linux] 리눅스 커널 및 버전 정보 확인 명령어</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-3e20bc5d      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#linux-리눅스-커널-및-버전-정보-확인-명령어" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" />[Linux] 리눅스 커널 및 버전 정보 확인 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-커널-버전-확인" class="uagb-toc-link__trigger">1&#x20e3; 커널 버전 확인</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#uname-명령어" class="uagb-toc-link__trigger">uname 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#옵션-정리" class="uagb-toc-link__trigger">옵션 정리</a></li></ul><li class="uagb-toc__list"><a href="#cat-procversion" class="uagb-toc-link__trigger">cat /proc/version</a></li></ul><li class="uagb-toc__list"><a href="#2-배포판-정보-확인" class="uagb-toc-link__trigger">2&#x20e3; 배포판 정보 확인</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#etcos-release-파일" class="uagb-toc-link__trigger">/etc/os-release 파일</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주요-필드-설명" class="uagb-toc-link__trigger">주요 필드 설명</a></li></ul><li class="uagb-toc__list"><a href="#lsb-release-명령어" class="uagb-toc-link__trigger">lsb_release 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#hostnamectl-명령어" class="uagb-toc-link__trigger">hostnamectl 명령어</a></li></ul><li class="uagb-toc__list"><a href="#3-상세-시스템-정보" class="uagb-toc-link__trigger">3&#x20e3; 상세 시스템 정보</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#etcissue-파일" class="uagb-toc-link__trigger">/etc/issue 파일</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#dmesg-명령어" class="uagb-toc-link__trigger">dmesg 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#procsyskernel-디렉토리" class="uagb-toc-link__trigger">/proc/sys/kernel/ 디렉토리</a></li></ul><li class="uagb-toc__list"><a href="#4-하드웨어-아키텍처-확인" class="uagb-toc-link__trigger">4&#x20e3; 하드웨어 아키텍처 확인</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주요-아키텍처-타입" class="uagb-toc-link__trigger">주요 아키텍처 타입</a></li></ul><li class="uagb-toc__list"><a href="#5-배포판별-특수-명령어" class="uagb-toc-link__trigger">5&#x20e3; 배포판별 특수 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#red-hat-centos-fedora" class="uagb-toc-link__trigger">Red Hat / CentOS / Fedora</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#debian-ubuntu" class="uagb-toc-link__trigger">Debian / Ubuntu</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#suse-opensuse" class="uagb-toc-link__trigger">SUSE / openSUSE</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#arch-linux" class="uagb-toc-link__trigger">Arch Linux</a></li></ul><li class="uagb-toc__list"><a href="#6-종합-정보-확인-스크립트" class="uagb-toc-link__trigger">6&#x20e3; 종합 정보 확인 스크립트</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#빠른-참조표" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 빠른 참조표</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#가장-많이-사용하는-명령어" class="uagb-toc-link__trigger">가장 많이 사용하는 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#상황별-추천-명령어" class="uagb-toc-link__trigger">상황별 추천 명령어</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h1 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" />[Linux] 리눅스 커널 및 버전 정보 확인 명령어</h1>



<h2 class="wp-block-heading">1&#x20e3; 커널 버전 확인</h2>



<h3 class="wp-block-heading">uname 명령어</h3>



<p>리눅스 시스템과 커널 정보를 확인할 때 쓰이는 아주 기본적인 도구</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 커널 버전만 출력
uname -r

# 모든 시스템 정보 출력
uname -a

# 커널 이름 출력
uname -s

# 커널 릴리스 정보
uname -v
</pre>



<div style="height:15px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">옵션 정리</h4>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>옵션</th><th>설명</th><th>예시</th></tr></thead><tbody><tr><td><code>-r</code></td><td>커널 버전만 출력 (release)</td><td><code>5.15.0-88-generic</code></td></tr><tr><td><code>-v</code></td><td>커널 릴리스 정보 출력 (version)</td><td><code>#90-Ubuntu SMP Fri Jul 14 00:44:00 UTC 2023</code></td></tr><tr><td><code>-s</code></td><td>커널 이름 출력 (system)</td><td><code>Linux</code></td></tr><tr><td><code>-n</code></td><td>호스트 이름 출력 (node)</td><td><code>myserver</code></td></tr><tr><td><code>-m</code></td><td>하드웨어 아키텍처 출력 (machine)</td><td><code>x86_64</code></td></tr><tr><td><code>-p</code></td><td>프로세서 종류 출력 (processor)</td><td><code>x86_64</code></td></tr><tr><td><code>-i</code></td><td>하드웨어 플랫폼 출력 (platform)</td><td><code>x86_64</code></td></tr><tr><td><code>-o</code></td><td>운영체제 이름 출력 (operating system)</td><td><code>GNU/Linux</code></td></tr><tr><td><code>-a</code></td><td>모든 정보 출력 (all)</td><td><code>Linux myserver 5.15.0-88-generic #90-Ubuntu SMP x86_64 GNU/Linux</code></td></tr></tbody></table></figure>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">cat /proc/version</h3>



<p><code>/proc</code>은 리눅스 커널이 제공하는 가상 파일 시스템 (<code>procfs</code>)로 실제 디스크에 존재하는 파일이 아니라, 커널 메모리 정보를 텍스트 파일 형태로 보여주는 인터페이스</p>



<p><code>/proc/version</code>은 커널 버전과 빌드 정보가 들어있는 파일로 <code>cat</code> 명령어로 내용을 읽어서 출력</p>



<ul class="wp-block-list">
<li>uname: 커널 런타임 정보</li>



<li>proc/version: 커널 빌드 정보 포함</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cat /proc/version
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Linux version 5.15.0-91-generic (buildd@lcy02-amd64-047) (gcc version 11.4.0)
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">2&#x20e3; 배포판 정보 확인</h2>



<h3 class="wp-block-heading">/etc/os-release 파일</h3>



<p><code>/etc/os-release</code>는 리눅스 배포판 정보가 들어있는 설정 파일로 커널 정보가 아니라 운영체제(OS) 배포판 정보를 담고 있음</p>



<p>대부분의 최신 리눅스 배포판에서 사용 가능하며 시스템 환경, 버전, 이름, ID, URL 등을 확인할 수 있음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cat /etc/os-release
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">NAME="Ubuntu"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
ID=ubuntu
VERSION_ID="22.04"
PRETTY_NAME="Ubuntu 22.04.3 LTS"
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">주요 필드 설명</h4>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>필드</th><th>설명</th><th>예시</th></tr></thead><tbody><tr><td><code>NAME</code></td><td>배포판 이름</td><td><code>Ubuntu</code></td></tr><tr><td><code>VERSION</code></td><td>배포판 버전</td><td><code>22.04.3 LTS (Jammy Jellyfish)</code></td></tr><tr><td><code>ID</code></td><td>배포판 식별자</td><td><code>ubuntu</code></td></tr><tr><td><code>VERSION_ID</code></td><td>버전 번호</td><td><code>22.04</code></td></tr><tr><td><code>PRETTY_NAME</code></td><td>사람이 읽기 쉬운 전체 이름</td><td><code>Ubuntu 22.04.3 LTS</code></td></tr><tr><td><code>HOME_URL</code></td><td>배포판 홈페이지</td><td><code>https://www.ubuntu.com/</code></td></tr></tbody></table></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">lsb_release 명령어</h3>



<p>LSB(Linux Standard Base) 정보를 표시하는 명령어로, 배포판의 표준화된 정보를 제공</p>



<p>일부 시스템에서는 <code>lsb-release</code> 패키지 설치가 필요할 수 있음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 모든 정보 출력
lsb_release -a

# 배포판 설명만 출력
lsb_release -d

# 버전만 출력
lsb_release -r

# 배포판 ID만 출력
lsb_release -i
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">hostnamectl 명령어</h3>



<p>systemd 기반 시스템에서 호스트명과 함께 운영체제 정보를 확인할 수 있는 명령어</p>



<p>시스템 관리에 유용하며 호스트명, 운영체제, 커널, 아키텍처 등을 한눈에 볼 수 있음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">hostnamectl
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">   Static hostname: myserver
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 1234567890abcdef1234567890abcdef
           Boot ID: abcdef1234567890abcdef1234567890
    Virtualization: kvm
  Operating System: Ubuntu 22.04.3 LTS
            Kernel: Linux 5.15.0-91-generic
      Architecture: x86-64
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">3&#x20e3; 상세 시스템 정보</h2>



<h3 class="wp-block-heading">/etc/issue 파일</h3>



<p>로그인 전 터미널에 표시되는 시스템 식별 정보를 담고 있는 파일</p>



<p>배포판에 따라 다른 내용을 표시하며, 간단한 배포판 정보를 빠르게 확인할 때 유용</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cat /etc/issue
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Ubuntu 22.04.3 LTS \n \l
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">dmesg 명령어</h3>



<p>커널 링 버퍼에 있는 메시지를 출력하는 명령어로, 부팅 시 커널이 출력한 메시지를 확인할 수 있음</p>



<p>시스템 부팅 과정과 하드웨어 인식 상태를 파악하는 데 유용</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 커널 버전 정보만 필터링
dmesg | grep "Linux version"

# 부팅 메시지 전체 확인
dmesg | less
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">[    0.000000] Linux version 5.15.0-91-generic (buildd@lcy02-amd64-047)
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">/proc/sys/kernel/ 디렉토리</h3>



<p>커널 파라미터와 설정 정보가 있는 디렉토리</p>



<p>실시간으로 커널 설정을 확인하고 필요시 변경할 수 있음</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 커널 버전
cat /proc/sys/kernel/osrelease

# 커널 타입
cat /proc/sys/kernel/ostype

# 호스트 이름
cat /proc/sys/kernel/hostname
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">5.15.0-91-generic
Linux
myserver
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">4&#x20e3; 하드웨어 아키텍처 확인</h2>



<p>시스템의 하드웨어 아키텍처 정보를 확인하는 명령어들</p>



<p>소프트웨어 호환성 확인이나 패키지 설치 시 필요한 정보</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 아키텍처 정보 (가장 많이 사용)
uname -m

# 프로세서 정보
uname -p

# 하드웨어 플랫폼
uname -i

# CPU 상세 정보
lscpu
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">주요 아키텍처 타입</h4>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>아키텍처</th><th>설명</th></tr></thead><tbody><tr><td><code>x86_64</code></td><td>64비트 인텔/AMD 프로세서</td></tr><tr><td><code>i386</code>, <code>i686</code></td><td>32비트 인텔 프로세서</td></tr><tr><td><code>aarch64</code></td><td>64비트 ARM 프로세서</td></tr><tr><td><code>armv7l</code></td><td>32비트 ARM 프로세서</td></tr></tbody></table></figure>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading">5&#x20e3; 배포판별 특수 명령어</h2>



<h3 class="wp-block-heading">Red Hat / CentOS / Fedora</h3>



<p>Red Hat 계열 배포판에서 사용하는 버전 확인 방법</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Red Hat 릴리스 정보
cat /etc/redhat-release

# CentOS 릴리스 패키지 정보
rpm -q centos-release

# Fedora 버전 확인
cat /etc/fedora-release
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">CentOS Linux release 7.9.2009 (Core)
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Debian / Ubuntu</h3>



<p>Debian 계열 배포판에서 사용하는 버전 확인 방법</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Debian 버전
cat /etc/debian_version

# Ubuntu 버전 (os-release 사용 권장)
cat /etc/lsb-release
</pre>



<p><strong>출력 예시:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">12.5
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">SUSE / openSUSE</h3>



<p>SUSE 계열 배포판에서 사용하는 버전 확인 방법</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># SUSE 릴리스 정보 (구버전)
cat /etc/SuSE-release

# openSUSE 버전 (최신)
cat /etc/os-release
</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Arch Linux</h3>



<p>Arch Linux에서 사용하는 버전 확인 방법</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Arch 릴리스 정보
cat /etc/arch-release

# 상세 정보
cat /etc/os-release
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)"/>



<h2 class="wp-block-heading">6&#x20e3; 종합 정보 확인 스크립트</h2>



<p>여러 명령어를 한 번에 실행하여 시스템의 전체 정보를 확인할 수 있는 스크립트</p>



<p>시스템 진단이나 문서화 작업 시 유용하게 활용 가능</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">#!/bin/bash

echo "=========================================="
echo "  시스템 정보 확인"
echo "=========================================="

echo ""
echo "=== 커널 버전 ==="
uname -r

echo ""
echo "=== 전체 시스템 정보 ==="
uname -a

echo ""
echo "=== 배포판 정보 ==="
cat /etc/os-release | head -5

echo ""
echo "=== 아키텍처 ==="
uname -m

echo ""
echo "=== 호스트 정보 ==="
hostnamectl | grep -E "hostname|Operating|Kernel|Architecture"

echo ""
echo "=========================================="
</pre>



<p><strong>실행 방법:</strong></p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 실행 권한 부여
chmod +x system_info.sh

# 스크립트 실행
./system_info.sh
</pre>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 빠른 참조표</h2>



<h3 class="wp-block-heading">가장 많이 사용하는 명령어</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>목적</th><th>명령어</th><th>설명</th></tr></thead><tbody><tr><td>커널 버전</td><td><code>uname -r</code></td><td>가장 빠르고 간단</td></tr><tr><td>전체 시스템 정보</td><td><code>uname -a</code></td><td>한 줄로 모든 정보</td></tr><tr><td>배포판 정보</td><td><code>cat /etc/os-release</code></td><td>표준 방식</td></tr><tr><td>상세 시스템 정보</td><td><code>hostnamectl</code></td><td>systemd 기반 시스템</td></tr><tr><td>아키텍처</td><td><code>uname -m</code></td><td>CPU 아키텍처 확인</td></tr></tbody></table></figure>



<h3 class="wp-block-heading">상황별 추천 명령어</h3>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>상황</th><th>추천 명령어</th></tr></thead><tbody><tr><td>처음 서버 접속</td><td><code>uname -a &amp;&amp; cat /etc/os-release</code></td></tr><tr><td>패키지 설치 전</td><td><code>uname -m &amp;&amp; cat /etc/os-release</code></td></tr><tr><td>문제 해결</td><td><code>dmesg | grep -i error</code></td></tr><tr><td>빠른 확인</td><td><code>uname -r</code></td></tr></tbody></table></figure>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50)"/>



<p></p>
<p>The post <a href="https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/">[Linux] 리눅스 커널 및 버전 정보 확인 명령어</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/etc/linux-%eb%a6%ac%eb%88%85%ec%8a%a4-%ec%bb%a4%eb%84%90-%eb%b0%8f-%eb%b2%84%ec%a0%84-%ec%a0%95%eb%b3%b4-%ed%99%95%ec%9d%b8-%eb%aa%85%eb%a0%b9%ec%96%b4/40334/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL 서비스 관리 명령어 (Ubuntu)</title>
		<link>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/</link>
					<comments>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Wed, 13 Aug 2025 11:50:10 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[3306]]></category>
		<category><![CDATA[ALTER USER]]></category>
		<category><![CDATA[ALTERUSER]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[configuration file]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Data Backup]]></category>
		<category><![CDATA[data migration]]></category>
		<category><![CDATA[Data Recovery]]></category>
		<category><![CDATA[data security]]></category>
		<category><![CDATA[DataBase]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database list]]></category>
		<category><![CDATA[database management]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Development Environment]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Disk]]></category>
		<category><![CDATA[error resolution]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[GRANT]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[iptables.]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[listening]]></category>
		<category><![CDATA[local access]]></category>
		<category><![CDATA[Manual]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[my.cnf]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL account]]></category>
		<category><![CDATA[MySQL backup]]></category>
		<category><![CDATA[MySQL client]]></category>
		<category><![CDATA[MySQL configuration]]></category>
		<category><![CDATA[MySQL installation]]></category>
		<category><![CDATA[MySQL monitoring]]></category>
		<category><![CDATA[MySQL recovery]]></category>
		<category><![CDATA[MySQL setup]]></category>
		<category><![CDATA[MySQL status]]></category>
		<category><![CDATA[MySQL tips]]></category>
		<category><![CDATA[MySQL tutorial]]></category>
		<category><![CDATA[MySQL version]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[MySQL계정]]></category>
		<category><![CDATA[MySQL모니터링]]></category>
		<category><![CDATA[MySQL백업]]></category>
		<category><![CDATA[MySQL버전]]></category>
		<category><![CDATA[MySQL복구]]></category>
		<category><![CDATA[MySQL상태]]></category>
		<category><![CDATA[MySQL서비스]]></category>
		<category><![CDATA[MySQL설정]]></category>
		<category><![CDATA[MySQL설치]]></category>
		<category><![CDATA[MySQL클라이언트]]></category>
		<category><![CDATA[MySQL튜토리얼]]></category>
		<category><![CDATA[MySQL팁]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[Port Number]]></category>
		<category><![CDATA[privilege management]]></category>
		<category><![CDATA[privileges]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[PROCESSLIST]]></category>
		<category><![CDATA[Production Environment]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[Remote Access]]></category>
		<category><![CDATA[remote connection]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[REVOKE]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[running queries]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[security settings]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server administration]]></category>
		<category><![CDATA[server operation]]></category>
		<category><![CDATA[service management]]></category>
		<category><![CDATA[service restart]]></category>
		<category><![CDATA[service start]]></category>
		<category><![CDATA[service stop]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Shell스크립트]]></category>
		<category><![CDATA[SHOW STATUS]]></category>
		<category><![CDATA[SHOW VARIABLES]]></category>
		<category><![CDATA[SHOWSTATUS]]></category>
		<category><![CDATA[SHOWVARIABLES]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL query]]></category>
		<category><![CDATA[SQL쿼리]]></category>
		<category><![CDATA[status check]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[superuser]]></category>
		<category><![CDATA[system engineer]]></category>
		<category><![CDATA[system management]]></category>
		<category><![CDATA[systemctl]]></category>
		<category><![CDATA[TABLE STATUS]]></category>
		<category><![CDATA[TABLESTATUS]]></category>
		<category><![CDATA[tech info]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[TUTORIAL]]></category>
		<category><![CDATA[ufw]]></category>
		<category><![CDATA[User]]></category>
		<category><![CDATA[user list]]></category>
		<category><![CDATA[User Management]]></category>
		<category><![CDATA[version check]]></category>
		<category><![CDATA[가이드]]></category>
		<category><![CDATA[개발]]></category>
		<category><![CDATA[개발자]]></category>
		<category><![CDATA[개발환경]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[관리]]></category>
		<category><![CDATA[권한]]></category>
		<category><![CDATA[권한관리]]></category>
		<category><![CDATA[기술정보]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[네트워크]]></category>
		<category><![CDATA[데브옵스]]></category>
		<category><![CDATA[데이터]]></category>
		<category><![CDATA[데이터마이그레이션]]></category>
		<category><![CDATA[데이터백업]]></category>
		<category><![CDATA[데이터베이스]]></category>
		<category><![CDATA[데이터베이스관리]]></category>
		<category><![CDATA[데이터베이스관리자]]></category>
		<category><![CDATA[데이터베이스목록]]></category>
		<category><![CDATA[데이터보안]]></category>
		<category><![CDATA[데이터복구]]></category>
		<category><![CDATA[디스크]]></category>
		<category><![CDATA[로그분석]]></category>
		<category><![CDATA[로컬접속]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[리모트접속]]></category>
		<category><![CDATA[리소스]]></category>
		<category><![CDATA[리스닝]]></category>
		<category><![CDATA[마이SQL]]></category>
		<category><![CDATA[마이그레이션]]></category>
		<category><![CDATA[매뉴얼]]></category>
		<category><![CDATA[메모리]]></category>
		<category><![CDATA[명령어]]></category>
		<category><![CDATA[모니터링]]></category>
		<category><![CDATA[문제해결]]></category>
		<category><![CDATA[방화벽]]></category>
		<category><![CDATA[배치]]></category>
		<category><![CDATA[백업]]></category>
		<category><![CDATA[버전확인]]></category>
		<category><![CDATA[보안]]></category>
		<category><![CDATA[보안설정]]></category>
		<category><![CDATA[복구]]></category>
		<category><![CDATA[비밀번호]]></category>
		<category><![CDATA[사용자관리]]></category>
		<category><![CDATA[사용자목록]]></category>
		<category><![CDATA[상태확인]]></category>
		<category><![CDATA[서버]]></category>
		<category><![CDATA[서버관리]]></category>
		<category><![CDATA[서버구축]]></category>
		<category><![CDATA[서버마이그레이션]]></category>
		<category><![CDATA[서버운영]]></category>
		<category><![CDATA[서비스관리]]></category>
		<category><![CDATA[서비스시작]]></category>
		<category><![CDATA[서비스재시작]]></category>
		<category><![CDATA[서비스중지]]></category>
		<category><![CDATA[설정파일]]></category>
		<category><![CDATA[성능튜닝]]></category>
		<category><![CDATA[센토스]]></category>
		<category><![CDATA[쉘]]></category>
		<category><![CDATA[슈퍼유저]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[스토리지]]></category>
		<category><![CDATA[시스템]]></category>
		<category><![CDATA[시스템관리]]></category>
		<category><![CDATA[시스템로그]]></category>
		<category><![CDATA[시스템엔지니어]]></category>
		<category><![CDATA[실행중인쿼리]]></category>
		<category><![CDATA[예약작업]]></category>
		<category><![CDATA[오류해결]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[운영]]></category>
		<category><![CDATA[운영환경]]></category>
		<category><![CDATA[원격접속]]></category>
		<category><![CDATA[유지보수]]></category>
		<category><![CDATA[일반사용자]]></category>
		<category><![CDATA[자동화]]></category>
		<category><![CDATA[정보]]></category>
		<category><![CDATA[커맨드라인]]></category>
		<category><![CDATA[쿼리]]></category>
		<category><![CDATA[터미널]]></category>
		<category><![CDATA[튜닝]]></category>
		<category><![CDATA[튜토리얼]]></category>
		<category><![CDATA[트러블슈팅]]></category>
		<category><![CDATA[패스워드]]></category>
		<category><![CDATA[포트]]></category>
		<category><![CDATA[포트번호]]></category>
		<category><![CDATA[프로덕션]]></category>
		<category><![CDATA[프로세스]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=40254</guid>

					<description><![CDATA[<p>MySQL 서비스 관리 명령어 상태 확인 서비스 시작 서비스 재시작 서비스 중지 부팅 시 자동 시작 설정 파일 추가 유용한 명령어 백업 및 복구</p>
<p>The post <a href="https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/">MySQL 서비스 관리 명령어 (Ubuntu)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-2c60eeae      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#mysql-서비스-관리-명령어" class="uagb-toc-link__trigger">MySQL 서비스 관리 명령어</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#상태-확인" class="uagb-toc-link__trigger">상태 확인</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-시작" class="uagb-toc-link__trigger">서비스 시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-재시작" class="uagb-toc-link__trigger">서비스 재시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#서비스-중지" class="uagb-toc-link__trigger">서비스 중지</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#부팅-시-자동-시작" class="uagb-toc-link__trigger">부팅 시 자동 시작</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#설정-파일" class="uagb-toc-link__trigger">설정 파일</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#추가-유용한-명령어" class="uagb-toc-link__trigger">추가 유용한 명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#백업-및-복구" class="uagb-toc-link__trigger">백업 및 복구</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">MySQL 서비스 관리 명령어</h2>



<h3 class="wp-block-heading">상태 확인</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl status mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl start mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 재시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 설정 변경 후 MySQL 재시작 필요
sudo systemctl restart mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">서비스 중지</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo systemctl stop mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">부팅 시 자동 시작</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 부팅 시 자동 시작 활성화
sudo systemctl enable mysql

# 부팅 시 자동 시작 비활성화
sudo systemctl disable mysql</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">설정 파일</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo cat /etc/mysql/my.cnf

# 현재 상태 정보 확인
mysql -u root -p -e "SHOW STATUS;"

# MySQL 클라이언트로 현재 설정 값 확인
mysql -u root -p -e "SHOW VARIABLES;"

# 특정 설정 값만 필터링해서 보기 (예: buffer_pool_size)
mysql -u root -p -e "SHOW VARIABLES LIKE '%buffer_pool_size%';"</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">추가 유용한 명령어</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># MySQL 프로세스 확인
ps aux | grep mysql

# MySQL 버전 확인
mysql -V
mysql -u root -p -e "SELECT version();"

# 사용자 목록 확인
mysql -u root -p -e "SELECT user, host FROM mysql.user;"

# 데이터베이스 목록 확인
mysql -u root -p -e "SHOW DATABASES;"

# 테이블 상태 확인
mysql -u root -p -e "SHOW TABLE STATUS;"

# 실행 중인 쿼리 확인
mysql -u root -p -e "SHOW PROCESSLIST;"</pre>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">백업 및 복구</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 전체 데이터베이스 백업
sudo mysqldump -u root -p --all-databases > full_backup.sql

# 특정 데이터베이스 백업
sudo mysqldump -u root -p database_name > db_backup.sql

# 백업 파일로 복구
mysql -u root -p &lt; full_backup.sql</pre>
<p>The post <a href="https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/">MySQL 서비스 관리 명령어 (Ubuntu)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/mysql-%ec%84%9c%eb%b9%84%ec%8a%a4-%ea%b4%80%eb%a6%ac-%eb%aa%85%eb%a0%b9%ec%96%b4-ubuntu/40254/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu – File Compression (파일 압축)</title>
		<link>https://lycos7560.com/ubuntu/ubuntu-file-compression-%ed%8c%8c%ec%9d%bc-%ec%95%95%ec%b6%95/38816/</link>
					<comments>https://lycos7560.com/ubuntu/ubuntu-file-compression-%ed%8c%8c%ec%9d%bc-%ec%95%95%ec%b6%95/38816/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Sun, 01 Dec 2024 06:04:49 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[-C]]></category>
		<category><![CDATA[-t]]></category>
		<category><![CDATA[-x]]></category>
		<category><![CDATA[Archive]]></category>
		<category><![CDATA[bzip2]]></category>
		<category><![CDATA[Command Line Tools]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[Compression Algorithms Ubuntu]]></category>
		<category><![CDATA[Compression Format 시스템 관리]]></category>
		<category><![CDATA[CPU Usage 디렉토리 압축]]></category>
		<category><![CDATA[CPU 사용량]]></category>
		<category><![CDATA[Data Backup]]></category>
		<category><![CDATA[Data Integrity 네트워크 전송]]></category>
		<category><![CDATA[Data Preservation]]></category>
		<category><![CDATA[Data Transfer 소프트웨어 도구]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Directory Compression]]></category>
		<category><![CDATA[Disk Management 파일 권한]]></category>
		<category><![CDATA[File Backup CLI 도구]]></category>
		<category><![CDATA[File Integrity]]></category>
		<category><![CDATA[File Management 데이터 백업]]></category>
		<category><![CDATA[File Permissions]]></category>
		<category><![CDATA[File System gzip]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network Transfer]]></category>
		<category><![CDATA[Open Source 보안]]></category>
		<category><![CDATA[Performance Optimization 파일 무결성]]></category>
		<category><![CDATA[Root Directory 시스템 리소스]]></category>
		<category><![CDATA[Script 데이터 보존]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software Tools]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[System Resources]]></category>
		<category><![CDATA[System Tools 아카이브]]></category>
		<category><![CDATA[System Utility]]></category>
		<category><![CDATA[tar]]></category>
		<category><![CDATA[xz]]></category>
		<category><![CDATA[데이터 무결성]]></category>
		<category><![CDATA[데이터 전송]]></category>
		<category><![CDATA[디스크 관리]]></category>
		<category><![CDATA[루트 디렉토리]]></category>
		<category><![CDATA[리눅스]]></category>
		<category><![CDATA[성능 최적화]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[시스템 도구]]></category>
		<category><![CDATA[시스템 유틸리티]]></category>
		<category><![CDATA[압축]]></category>
		<category><![CDATA[압축 알고리즘]]></category>
		<category><![CDATA[압축 형식]]></category>
		<category><![CDATA[오픈소스]]></category>
		<category><![CDATA[우분투]]></category>
		<category><![CDATA[파일]]></category>
		<category><![CDATA[파일 관리]]></category>
		<category><![CDATA[파일 백업]]></category>
		<category><![CDATA[파일 시스템]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38816</guid>

					<description><![CDATA[<p>gzip (.gz) 특징 압축률 명령어 주의 사항 xz (.xz) 특징 압축률 명령어 주의사항 bzip2 (.bz2) 특징 압축률 명령어 주의사항 zip/unzip (.zip) 특징 압축률 명령어 주의사항 tar (.tar, .tar.gz, .tgz, .tar.xz &#8230;) 특징 명령어 1. 기본 동작 (파일 아카이브 및 압축) 1.1&#160;파일 아카이브 생성 (압축 없이 파일 묶기) 명령어 예시: 1.2&#160;파일 압축 생성 (압축 포함) 명령어 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-file-compression-%ed%8c%8c%ec%9d%bc-%ec%95%95%ec%b6%95/38816/">Ubuntu – File Compression (파일 압축)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-f9f2c32b      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#gzip-gz" class="uagb-toc-link__trigger">gzip (.gz)</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#특징" class="uagb-toc-link__trigger">특징</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#압축률" class="uagb-toc-link__trigger">압축률</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#명령어" class="uagb-toc-link__trigger">명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주의-사항" class="uagb-toc-link__trigger">주의 사항</a></li></ul></li><li class="uagb-toc__list"><a href="#xz-xz" class="uagb-toc-link__trigger">xz (.xz)</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#특징" class="uagb-toc-link__trigger">특징</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#압축률" class="uagb-toc-link__trigger">압축률</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#명령어" class="uagb-toc-link__trigger">명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주의사항" class="uagb-toc-link__trigger">주의사항</a></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#bzip2-bz2" class="uagb-toc-link__trigger">bzip2 (.bz2)</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#특징" class="uagb-toc-link__trigger">특징</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#압축률" class="uagb-toc-link__trigger">압축률</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#명령어" class="uagb-toc-link__trigger">명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주의사항" class="uagb-toc-link__trigger">주의사항</a></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#zipunzip-zip" class="uagb-toc-link__trigger">zip/unzip (.zip)</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#특징" class="uagb-toc-link__trigger">특징</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#압축률" class="uagb-toc-link__trigger">압축률</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#명령어" class="uagb-toc-link__trigger">명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주의사항" class="uagb-toc-link__trigger">주의사항</a></li></ul></li></ul></li></ul></li></ul></li><li class="uagb-toc__list"><a href="#tar-tar-targz-tgz-tarxz" class="uagb-toc-link__trigger">tar (.tar, .tar.gz, .tgz, .tar.xz &#8230;)</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#특징" class="uagb-toc-link__trigger">특징</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#명령어" class="uagb-toc-link__trigger">명령어</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#정리" class="uagb-toc-link__trigger">정리</a></ul></ul></ul></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>gzip (.gz)</strong></h2>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">특징</h4>



<ul class="wp-block-list">
<li>가장 일반적이고 가벼운 압축 형식 </li>



<li>리눅스/유닉스 시스템에서 널리 사용 </li>



<li>빠른 압축 및 해제 속도</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">압축률</h4>



<ul class="wp-block-list">
<li>빠르고 경량한 압축 형식</li>



<li>상대적으로 중간 수준의 압축률 </li>



<li>CPU 부하가 낮음</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">명령어</h4>



<ul class="wp-block-list">
<li>압축</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""> gzip filename</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>압축 해제</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">gunzip filename.gz
gzip -d filename.gz</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>압축 레벨 설정 (1 ~ 9)</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">gzip -1 filename   # 빠른 압축, 낮은 압축률
gzip -9 filename   # 최대 압축, 느린 속도</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>원본 파일 유지</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">gzip -k filename   # 압축 후 원본 파일 유지</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>사용 예시</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 단일 파일 압축
gzip document.txt

# 여러 파일 압축
gzip file1.txt file2.txt file3.txt

# 압축 해제
gunzip document.txt.gz

# 압축 내용 확인 (압축 해제 없이)
zcat document.txt.gz</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">주의 사항</h4>



<ul class="wp-block-list">
<li>단일 파일 압축에 최적 </li>



<li>디렉토리 압축 불가 (tar 사용)</li>



<li>압축 해제 시 원본 파일 덮어씀</li>
</ul>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>xz (.xz)</strong></h2>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">특징</h4>



<ul class="wp-block-list">
<li>최고 수준의 압축률 </li>



<li>장기 보관 및 대용량 파일에 최적 </li>



<li>매우 느린 압축/해제 속도</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">압축률</h4>



<ul class="wp-block-list">
<li>가장 높은 압축률 </li>



<li>파일 크기 가장 작게 압축 </li>



<li>CPU 사용량이 상대적으로 높음</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">명령어</h4>



<ul class="wp-block-list">
<li>압축</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">xz filename</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>압축 해제</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">unxz filename.xz
xz -d filename.xz</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>압축 레벨 설정 (1 ~ 9)</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">xz -0 filename   # 빠른 압축, 낮은 압축률
xz -9 filename   # 최대 압축, 매우 느린 속도</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>원본 파일 유지</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">xz -k filename   # 압축 후 원본 파일 유지</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>사용 예시</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 단일 파일 압축
xz document.txt

# 여러 파일 압축
xz file1.txt file2.txt file3.txt

# 압축 해제
unxz document.txt.xz</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">주의사항</h4>



<ul class="wp-block-list">
<li>장기 보관 파일에 최적 </li>



<li>압축/해제 속도 매우 느림 </li>



<li>높은 CPU 및 메모리 사용</li>
</ul>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>bzip2 (.bz2)</strong></h2>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">특징</h4>



<ul class="wp-block-list">
<li>gzip보다 높은 압축률</li>



<li>대용량 파일 압축에 적합</li>



<li>상대적으로 느린 압축/해제 속도</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">압축률</h4>



<ul class="wp-block-list">
<li>높은 압축률</li>



<li>CPU 사용량 높음</li>



<li>파일 크기 더 작게 압축</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">명령어</h4>



<ul class="wp-block-list">
<li>압축</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">bzip2 filename</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>압축 해제</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">bunzip2 filename.bz2
bzip2 -d filename.bz2</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>압축 레벨 설정 (1 ~ 9)</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">bzip2 -1 filename   # 빠른 압축, 낮은 압축률
bzip2 -9 filename   # 최대 압축, 느린 속도</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>원본 파일 유지</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">bzip2 -k filename   # 압축 후 원본 파일 유지</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>사용 예시</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 단일 파일 압축
bzip2 document.txt

# 여러 파일 압축
bzip2 file1.txt file2.txt file3.txt

# 압축 해제
bunzip2 document.txt.bz2</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">주의사항</h4>



<ul class="wp-block-list">
<li>대용량 파일에 적합</li>



<li>압축 속도 느림</li>



<li>상대적으로 높은 CPU 리소스 소모</li>
</ul>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>zip/unzip (.zip)</strong></h2>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">특징</h4>



<ul class="wp-block-list">
<li>크로스 플랫폼 호환 압축 형식 </li>



<li>Windows, Linux, macOS 모두 지원 </li>



<li>여러 파일 동시 압축 가능</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">압축률</h4>



<ul class="wp-block-list">
<li>중간 수준의 압축률 </li>



<li>빠른 압축/해제 속도 </li>



<li>디렉토리 압축 가능</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">명령어</h4>



<ul class="wp-block-list">
<li>압축</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">zip archivename.zip file1 file2</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>압축 해제</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">unzip archivename.zip</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>압축 레벨 설정 (1 ~ 9)</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">bzip2 -1 filename   # 빠른 압축, 낮은 압축률
bzip2 -9 filename   # 최대 압축, 느린 속도</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<ul class="wp-block-list">
<li>사용 예시</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># 단일 파일 압축
zip document.zip document.txt

# 여러 파일 압축
zip multiple.zip file1.txt file2.txt

# 디렉토리 압축
zip -r project.zip project_folder

# 압축 해제
unzip multiple.zip

# 압축 파일 내용 확인
unzip -l multiple.zip</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">주의사항</h4>



<ul class="wp-block-list">
<li>크로스 플랫폼 호환성 높음 </li>



<li>압축/해제 속도 빠름 </li>



<li>원본 파일 유지됨</li>
</ul>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>tar (.tar, .tar.gz, .tgz, .tar.xz &#8230;)</strong></h2>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">특징</h4>



<ul class="wp-block-list">
<li>리눅스/유닉스 시스템에서 가장 널리 사용되는 아카이브 형식</li>



<li>여러 파일이나 디렉토리를 하나의 파일로 묶는 데 사용</li>



<li>압축 없이 파일을 묶을 수 있으며, 다른 압축 형식과 결합하여 압축도 가능</li>



<li>압축 기능을 제공하지 않지만,&nbsp;<code>.tar.gz</code>나&nbsp;<code>.tar.xz</code>와 같은 형식으로 압축을 추가할 수 있음</li>



<li>디렉토리 구조와 메타데이터를 유지하면서 파일을 묶음</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">명령어</h4>



<h5 class="wp-block-heading"><strong>1. 기본 동작 (파일 아카이브 및 압축)</strong></h5>



<h6 class="wp-block-heading">1.1&nbsp;<strong>파일 아카이브 생성 (압축 없이 파일 묶기)</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-c</code>,&nbsp;<code>-f</code>
<ul class="wp-block-list">
<li><code>-c</code>&nbsp;: 새로운 아카이브를 생성</li>



<li><code>-f</code>&nbsp;: 아카이브 파일 이름 지정</li>



<li><code>-C:</code>디렉토리 지정</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -cf archive.tar file1 file2

tar -cz archive.tar -C /path/to/directory file1 file2
</pre>



<ul class="wp-block-list">
<li><code>file1</code>,&nbsp;<code>file2</code>를&nbsp;<code>archive.tar</code>로 묶음.</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h6 class="wp-block-heading">1.2&nbsp;<strong>파일 압축 생성 (압축 포함)</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-c</code>,&nbsp;<code>-f</code>,&nbsp;<code>-z</code>&nbsp;(gzip 압축),&nbsp;<code>-J</code>&nbsp;(xz 압축) -j (bzip2 압축)
<ul class="wp-block-list">
<li><code>-z</code>&nbsp;: gzip 압축을 사용하여 아카이브 생성</li>



<li><code>-J</code>&nbsp;: xz 압축을 사용하여 아카이브 생성</li>



<li><code>-j:</code>bzip2 압축을 사용하여 아카이브 생성</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -czf archive.tar.gz file1 file2
tar -cJf archive.tar.xz file1 file2
tar -cjf archive.tar.bz2 file1 file2</pre>



<ul class="wp-block-list">
<li><code>file1</code>과&nbsp;<code>file2</code>를 각각 gzip 또는 xz, bzip2 압축을 사용하여 아카이브로 묶음.</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h6 class="wp-block-heading">1.3&nbsp;<strong>디렉토리 압축</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>: <code>-c</code>, <code>-f</code>, <code>-r</code> (디렉토리 포함)</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -czf archive.tar.gz directory/
</pre>



<ul class="wp-block-list">
<li><code>directory/</code>&nbsp;디렉토리 내 모든 파일과 하위 디렉토리를 포함하여 gzip으로 압축한 아카이브 생성.</li>
</ul>



<div style="height:49px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading"><strong>2. 파일 압축 해제 (아카이브 풀기)</strong></h5>



<h6 class="wp-block-heading">2.1&nbsp;<strong>파일 압축 해제 (기본 아카이브 풀기)</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-x</code>,&nbsp;<code>-f</code>
<ul class="wp-block-list">
<li><code>-x</code>&nbsp;: 아카이브에서 파일을 추출</li>



<li><code>-f</code>&nbsp;: 아카이브 파일 이름 지정</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -xf archive.tar

tar -xf archive.tar -C /path/to/destination
</pre>



<ul class="wp-block-list">
<li><code>archive.tar</code>에서 파일을 압축 해제하여 현재 디렉토리에 복원.</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading">2.2&nbsp;<strong>압축 해제 (gzip 압축 해제)</strong></h5>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-x</code>,&nbsp;<code>-f</code>,&nbsp;<code>-z</code>
<ul class="wp-block-list">
<li><code>-z</code>&nbsp;: gzip 압축 해제</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -xzf archive.tar.gz
</pre>



<ul class="wp-block-list">
<li><code>archive.tar.gz</code>에서 압축을 풀고 파일을 복원.</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading">2.3&nbsp;<strong>압축 해제 (xz 압축 해제)</strong></h5>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-x</code>,&nbsp;<code>-f</code>,&nbsp;<code>-J</code>
<ul class="wp-block-list">
<li><code>-J</code>&nbsp;: xz 압축 해제</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -xJf archive.tar.xz
</pre>



<ul class="wp-block-list">
<li><code>archive.tar.xz</code>에서 xz 압축을 해제하여 파일 복원.</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading">2.4&nbsp;<strong>압축 해제 (bzip2 압축 해제)</strong></h5>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-x</code>,&nbsp;<code>-f</code>,&nbsp;<code>-j</code>
<ul class="wp-block-list">
<li><code>-j </code>: bzip2 압축 해제</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -xjf archive.tar.bz2</pre>



<ul class="wp-block-list">
<li><code>archive.tar.bz2</code>에서 bzip2 압축을 해제하여 파일 복원.</li>
</ul>



<div style="height:49px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading"><strong>3. 아카이브 내용 확인 및 목록 보기</strong></h5>



<h6 class="wp-block-heading">3.1&nbsp;<strong>아카이브 내용 확인 (목록 보기)</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-t</code>,&nbsp;<code>-f</code>
<ul class="wp-block-list">
<li><code>-t</code>&nbsp;: 아카이브의 내용을 목록으로 표시</li>



<li><code>-f</code>&nbsp;: 아카이브 파일 이름 지정</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -tf archive.tar
</pre>



<ul class="wp-block-list">
<li><code>archive.tar</code>&nbsp;아카이브의 내용을 목록으로 표시 (압축 해제하지 않고).</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading">3.2&nbsp;<strong>압축 해제 없이 내용 확인 (gzip 압축 아카이브)</strong></h5>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-t</code>,&nbsp;<code>-f</code>,&nbsp;<code>-z</code></li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -tzf archive.tar.gz
</pre>



<ul class="wp-block-list">
<li><code>archive.tar.gz</code>&nbsp;아카이브의 내용을 확인, 압축 해제하지 않음.</li>
</ul>



<div style="height:49px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading"><strong>4. 아카이브에서 특정 파일 추출</strong></h5>



<h6 class="wp-block-heading">4.1&nbsp;<strong>특정 파일만 추출</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-x</code>,&nbsp;<code>-f</code>
<ul class="wp-block-list">
<li><code>-x</code>&nbsp;: 아카이브에서 파일을 추출</li>



<li><code>-f</code>&nbsp;: 아카이브 파일 이름 지정</li>



<li>특정 파일 이름을 지정하여 해당 파일만 추출</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -tzf archive.tar.gz
</pre>



<ul class="wp-block-list">
<li><code>archive.tar</code>에서&nbsp;<code>file1.txt</code>만 추출.</li>
</ul>



<div style="height:49px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading"><strong>5. 원본 파일 유지 및 덮어쓰기 방지</strong></h5>



<h6 class="wp-block-heading">5.1&nbsp;<strong>원본 파일 유지 (압축 후 원본 파일 삭제 방지)</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-k</code>
<ul class="wp-block-list">
<li><code>-k</code>&nbsp;: 압축 해제 후 원본 파일을 덮어쓰지 않음</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -xkf archive.tar
</pre>



<ul class="wp-block-list">
<li><code>archive.tar</code>를 압축 해제하면서 원본 파일을 덮어쓰지 않음.</li>
</ul>



<div style="height:49px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading"><strong>6. 압축 옵션</strong></h5>



<h6 class="wp-block-heading">6.1&nbsp;<strong>압축 수준 설정</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-z</code>,&nbsp;<code>-J</code>
<ul class="wp-block-list">
<li><code>-z</code>&nbsp;: gzip 압축을 사용할 때 압축 수준 설정</li>



<li><code>-J</code>&nbsp;: xz 압축을 사용할 때 압축 수준 설정</li>



<li><code>-j:</code>bzip2 압축을 사용할 때 압축 수준 설정</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># gzip 압축 (빠른 압축)
tar -czf archive.tar.gz --fast file1 file2

# gzip 압축 (최대 압축)
tar -czf archive.tar.gz --best file1 file2


# xz 압축 (빠른 압축)
tar -cJf archive.tar.xz --fast file1 file2

# xz 압축 (최대 압축)
tar -cJf archive.tar.xz --best file1 file2


# bzip2 압축 (빠른 압축)
tar -cjf archive.tar.bz2 --fast file1 file2

# bzip2 압축 (최대 압축)
tar -cjf archive.tar.bz2 --best file1 file2


# 1-9 사이의 숫자로 gzip 압축 수준 지정
tar -cz9f archive.tar.gz file1 file2   # 최대 압축
tar -cz1f archive.tar.gz file1 file2   # 최소 압축


# xz 압축도 동일하게 적용
tar -cJ9f archive.tar.xz file1 file2   # 최대 압축
tar -cJ1f archive.tar.xz file1 file2   # 최소 압축


# bzip2 압축도 동일하게 적용
tar -cj9f archive.tar.bz2 file1 file2  # 최대 압축
tar -cj1f archive.tar.bz2 file1 file2  # 최소 압축


# gzip 압축 (최대 압축) 및 디렉토리 변경
tar -czf archive.tar.gz --best -C /path/to/directory file1 file2

# xz 압축 (최대 압축) 및 디렉토리 변경
tar -cJf archive.tar.xz --best -C /path/to/directory file1 file2

# bzip2 압축 (최대 압축) 및 디렉토리 변경
tar -cjf archive.tar.bz2 --best -C /path/to/directory file1 file2
</pre>



<ul class="wp-block-list">
<li><code>--fast</code>는 압축 속도를 빠르게 하여 압축률은 낮추고,&nbsp;<code>--best</code>는 최대 압축을 하여 압축률을 높입니다.</li>
</ul>



<div style="height:49px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading"><strong>7. 기타 유용한 옵션</strong></h5>



<h6 class="wp-block-heading">7.1&nbsp;<strong>아카이브를 다른 파일로 출력</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>-O</code>
<ul class="wp-block-list">
<li><code>-O</code>&nbsp;: 파일을 표준 출력으로 출력</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -xO -f archive.tar file1.txt
</pre>



<ul class="wp-block-list">
<li><code>archive.tar</code>에서&nbsp;<code>file1.txt</code>를 추출하여 표준 출력으로 출력 (파일로 저장하지 않음).</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h6 class="wp-block-heading">7.2&nbsp;<strong>파일 패턴으로 추출</strong></h6>



<ul class="wp-block-list">
<li><strong>옵션</strong>:&nbsp;<code>--wildcards</code>
<ul class="wp-block-list">
<li>특정 패턴에 맞는 파일만 추출</li>
</ul>
</li>
</ul>



<p><strong>명령어 예시</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">tar -xf archive.tar --wildcards '*.txt'
</pre>



<ul class="wp-block-list">
<li><code>archive.tar</code>에서&nbsp;<code>.txt</code>&nbsp;파일만 추출.</li>
</ul>



<div style="height:49px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading"><strong>정리</strong></h4>



<ul class="wp-block-list">
<li><strong><code>-c</code></strong>: 아카이브 생성</li>



<li><code><strong>-C</strong>:</code>디렉토리 지정</li>



<li><strong><code>-x</code></strong>: 아카이브에서 파일 추출</li>



<li><strong><code>-t</code></strong>: 아카이브 내용 확인</li>



<li><strong><code>-f</code></strong>: 아카이브 파일 이름 지정</li>



<li><strong><code>-z</code></strong>: gzip 압축/해제</li>



<li><strong><code>-J</code></strong>: xz 압축/해제</li>



<li><strong><code>-j</code>: </strong>bzip2 압축/해제</li>



<li><strong><code>-k</code></strong>: 원본 파일 유지</li>



<li><strong><code>-O</code></strong>: 표준 출력으로 파일 출력</li>



<li><strong><code>--wildcards</code></strong>: 파일 패턴으로 추출</li>
</ul>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<p>The post <a href="https://lycos7560.com/ubuntu/ubuntu-file-compression-%ed%8c%8c%ec%9d%bc-%ec%95%95%ec%b6%95/38816/">Ubuntu – File Compression (파일 압축)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/ubuntu/ubuntu-file-compression-%ed%8c%8c%ec%9d%bc-%ec%95%95%ec%b6%95/38816/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Unity / FPS Counter Script</title>
		<link>https://lycos7560.com/unity/unity-fps-counter-script/33277/</link>
					<comments>https://lycos7560.com/unity/unity-fps-counter-script/33277/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 23 Feb 2023 09:04:22 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[FPS]]></category>
		<category><![CDATA[FPS Counter Script]]></category>
		<category><![CDATA[GUIStyle]]></category>
		<category><![CDATA[OnGUI()]]></category>
		<category><![CDATA[Profiler]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[유니티]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=33277</guid>

					<description><![CDATA[<p>Unity 에서 사용하는 FPS를 Count 해주는 스크립트 입니다. (This script counts the FPS used by Unity.)</p>
<p>The post <a href="https://lycos7560.com/unity/unity-fps-counter-script/33277/">Unity / FPS Counter Script</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5698326622209671" crossorigin="anonymous"></script>
<!-- HorizontalAD -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5698326622209671" data-ad-slot="6908948342" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Unity Version : 2021.3.5f1


using System.Collections;
using UnityEngine;

public class ShowFPSMobile : MonoBehaviour
{
    // provided by Niter88
    private string fps = "";

    private WaitForSecondsRealtime waitForFrequency;

    GUIStyle style = new GUIStyle();
    Rect rect;

    bool isInicialized = false;


    private void Awake()
    {
        //float fraction = 0.5f; // Render at half the resolution of current screen
        //float fraction = 0.8f;
        //float fraction = 1f;
        //Screen.SetResolution((int)(Screen.currentResolution.width * fraction), (int)(Screen.currentResolution.height * fraction), true);

        //don't use vsync on mobile, limit fps instead

        // Sync framerate to monitors refresh rate
        //Use 'Don't Sync' (0) to not wait for VSync. Value must be 0, 1, 2, 3, or 4
        QualitySettings.vSyncCount = 0;

        // Disable screen dimming
        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        Inicialize(true); //use for testing on editor
    }

    private IEnumerator FPS()
    {
        int lastFrameCount;
        float lastTime;
        float timeSpan;
        int frameCount;
        for (; ; )
        {
            // Capture frame-per-second
            lastFrameCount = Time.frameCount;
            lastTime = Time.realtimeSinceStartup;
            yield return waitForFrequency;
            timeSpan = Time.realtimeSinceStartup - lastTime;
            frameCount = Time.frameCount - lastFrameCount;

            fps = string.Format("FPS: {0}", Mathf.RoundToInt(frameCount / timeSpan));
        }
    }


    void OnGUI()
    {
        // Display
        
        // GUI.Label(rect, fps, style);
        // GUI.Label(new Rect(Screen.width - 110, 5, 0, Screen.height * 2 / 100), fps, style);

        GUI.Label(new Rect(10, 10, Screen.width, Screen.height * 2 / 100), fps, style);
        //GUI.Label(new Rect(Screen.width - 100, 10, 150, 20), fps, style);
    }

    private void Inicialize(bool showFps)
    {
        isInicialized = true;

        style.alignment = TextAnchor.UpperLeft;
        style.fontSize = Screen.height * 3 / 100;
        style.normal.textColor = new Color32(0, 200, 0, 255);
        rect = new Rect(Screen.width * 90 / 100, 5, 0, Screen.height * 2 / 100);

        if (showFps)
            StartCoroutine(FPS());
    }


    public void SetNewConfig(GraphicSettingsMB gSettings)
    {
        Application.targetFrameRate = gSettings.targetFrameRate;

        waitForFrequency = new WaitForSecondsRealtime(gSettings.testFpsFrequency);

        if (!isInicialized) Inicialize(gSettings.showFps);

        if (!gSettings.showFps)
            Destroy(this.gameObject);
    }
}

[SerializeField]
public class GraphicSettingsMB
{
    public byte targetFrameRate = 90;
    public byte testFpsFrequency = 1;
    public bool showFps = false;
}</pre>



<div style="height:48px" aria-hidden="true" class="wp-block-spacer"></div>



<p><a href="https://forum.unity.com/threads/fps-counter.505495/" target="_blank" rel="noreferrer noopener">https://forum.unity.com/threads/fps-counter.505495/</a></p>



<figure class="wp-block-image size-full"><img decoding="async" width="986" height="823" src="https://lycos7560.com/wp-content/uploads/2023/02/image-87.png" alt="" class="wp-image-33278" srcset="https://lycos7560.com/wp-content/uploads/2023/02/image-87.png 986w, https://lycos7560.com/wp-content/uploads/2023/02/image-87-300x250.png 300w, https://lycos7560.com/wp-content/uploads/2023/02/image-87-768x641.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></figure>



<div style="height:51px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size"><a href="https://pubul.tistory.com/203" target="_blank" rel="noreferrer noopener">https://pubul.tistory.com/203</a></p>



<p class="has-medium-font-size">보통 게임을 만들때, 특히 출시까지 고려하게 되면 최적화는 피할 수 없는 문제가 된다.</p>



<p class="has-medium-font-size">그런데 내가 처음 게임을 만들때는 이런 기준이 전혀 잡히지 않아서 난감하고 막막했었다.</p>



<p class="has-medium-font-size">하지만 물론 게임마다 다르겠지만, 대략적으로 기준을 잡는 방법이 있다</p>



<p class="has-medium-font-size">아마 듣고 나면 당연해서 왜 생각 못했지 싶을 것 같다.</p>



<p class="has-medium-font-size">아무튼 상당히 명료한 기준이다.</p>



<p class="has-medium-font-size">바로&nbsp;<strong>fps를 기준으로 잡으면 된다.</strong></p>



<p class="has-medium-font-size">뭔소리고 하니, 일반적인 게임은<strong>&nbsp;60fps 혹은 120fps</strong>정도로 맞춘다.</p>



<p class="has-medium-font-size">물론 그 이상의 프레임을 원하는 유저들도 있지만, 보통은 저정도 프레임률이 나오면 보통은 만족한다.</p>



<p class="has-medium-font-size">안드로이드는 60fps, pc는 120fps를 기준으로 잡으면 된다.</p>



<p class="has-medium-font-size">fps는 초당 프레임률이기 때문에, fps를 역수 취해주면 프레임당 초가 나온다.</p>



<p class="has-medium-font-size">1/120= 0.00833&#8230;, 따라서 8ms 이내로 하나의 프레임을 처리 할 수 있으면 된다.</p>



<p class="has-medium-font-size">60fps로 잡으면 그 두배인 16ms면 이내로 처리하면 될 것이다.</p>



<p class="has-medium-font-size">여기부터는 유니티 기준 얘기다.</p>



<p class="has-medium-font-size">프레임단위 처리에 소요시간을 기준으로 판단해야한다는 것을 알았다.</p>



<p class="has-medium-font-size">이를 확인하는 방법은 여러가지가 있겠으나,</p>



<p class="has-medium-font-size">가장 편리한 방법은 유니티 프로파일러를 이용하는 것이다.</p>



<p>나머지는 해당 글에서 확인</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--80)"/>



<p>UniTask</p>



<p><a href="https://github.com/Cysharp/UniTask" target="_blank" rel="noreferrer noopener">https://github.com/Cysharp/UniTask</a></p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p>SingletonMonobehaviour.cs</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SingletonMonobehaviour&lt;T> : MonoBehaviour where T : MonoBehaviour
{
    static T _Instance = null;
    public static T Instance
    {
        get
        {
            if (_Instance == null) {
                _Instance = (T)FindObjectOfType(typeof(T));
                if (_Instance == null) {
                    var _NewGameObject = new GameObject(typeof(T).ToString());
                    _Instance = _NewGameObject.AddComponent&lt;T>();
                }
            }
            return _Instance;
        }
    }

    protected virtual void Awake()
    {
        if (_Instance == null)
            _Instance = this as T;
        
        DontDestroyOnLoad(gameObject);
    }
}</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p>ApplicationManager.cs</p>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using UnityEngine;
using Cysharp.Threading.Tasks;
using System.Threading;

public partial class ApplicationManager : SingletonMonobehaviour&lt;ApplicationManager>
{
    [Header("== :: Initial Settings :: ==")]
    [SerializeField]
    byte TargetFPS;

    protected override void Awake()
    {
        base.Awake();

        ActiveFPSDebugger();
        ChangeTargetFrameRate(TargetFPS);
    }
}

#region == :: FPS Debuger Region :: ==

public partial class ApplicationManager
{
    public float CurFPS_f { get; private set; }
    public string CurFPS_str => string.Format($"FPS : {CurFPS_f:0.0}");
    public bool IsActiveFPSDebuger 
        => FPSTask.Status == UniTaskStatus.Pending;


    byte _FpsFrequency = 1;

    GUIStyle _GUIStyle = new();

    Rect _Rect;

    UniTask FPSTask { get; set; }

    CancellationTokenSource FPSTaskCancelTokenSource { get; set; }


    void OnGUI()
    {
        if (!IsActiveFPSDebuger)
            return;
        GUI.Label(_Rect, CurFPS_str, _GUIStyle);
    }

    public void ChangeTargetFrameRate(byte _targetFrame)
    {
        QualitySettings.vSyncCount = 0;
        Application.targetFrameRate = _targetFrame;
#if (UNITY_EDITOR)
        Debug.LogFormat($"&lt;Color=red>Change the TargetFrame.{_targetFrame}&lt;/color>");
#endif
    }
    public void ActiveFPSDebugger()
    {
        if (IsActiveFPSDebuger)
        {
#if (UNITY_EDITOR)
            Debug.LogFormat($"&lt;Color=red>FPS Debugger is already running.&lt;/color>");
#endif
            return;
        }
        FPSTaskCancelTokenSource = new CancellationTokenSource();
        FPSTask = FPSDebuggerTask();

        _GUIStyle.alignment = TextAnchor.UpperLeft;
        _GUIStyle.fontSize = Screen.height / 25;
        _GUIStyle.normal.textColor = new(0, 200, 0, 255);
        _GUIStyle.fontStyle = FontStyle.Bold;
        _Rect = new(Screen.width / 20, Screen.height / 20, 100, 100);
    }
    public void DeActiveFPSDebugger()
    {
        if (!IsActiveFPSDebuger)
        {
#if (UNITY_EDITOR)
            Debug.LogFormat($"&lt;Color=red>FPS Debugger is not running.&lt;/color>");
#endif
            return;
        }
        FPSTaskCancelTokenSource.Cancel();
    }

    private async UniTask FPSDebuggerTask()
    {
        float _elapsedTime = 0f;
        int _frameCount = 0;

        var _Token = FPSTaskCancelTokenSource.Token;

        while (!_Token.IsCancellationRequested)
        {
            await UniTask.DelayFrame(_FpsFrequency);
            _frameCount++;
            _elapsedTime += Time.deltaTime;

            if (_elapsedTime >= _FpsFrequency)
            {
                CurFPS_f = _frameCount / _elapsedTime;
                _frameCount = 0;
                _elapsedTime = 0f;
            }
        }
    }
}

#endregion
</pre>



<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5698326622209671" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5698326622209671" data-ad-slot="4245812909"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
<p>The post <a href="https://lycos7560.com/unity/unity-fps-counter-script/33277/">Unity / FPS Counter Script</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/unity/unity-fps-counter-script/33277/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Unity AnimationEvent AddEvent (스크립트/애니메이션/파라미터)</title>
		<link>https://lycos7560.com/unity/unity-animationevent-parameter/3508/</link>
					<comments>https://lycos7560.com/unity/unity-animationevent-parameter/3508/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 22 Dec 2022 03:51:31 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[AddEvent]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[animator]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[Parameter]]></category>
		<category><![CDATA[스크립트]]></category>
		<category><![CDATA[애니메이션]]></category>
		<category><![CDATA[애니메이터]]></category>
		<category><![CDATA[유니티]]></category>
		<category><![CDATA[이벤트]]></category>
		<category><![CDATA[파라미터]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=3508</guid>

					<description><![CDATA[<p>유니티 애니메이션 이벤트 적용 방법에 대한 간단한 글입니다. (This is a brief article on how to apply Unity animation events.)</p>
<p>The post <a href="https://lycos7560.com/unity/unity-animationevent-parameter/3508/">Unity AnimationEvent AddEvent (스크립트/애니메이션/파라미터)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5698326622209671"
     crossorigin="anonymous"></script>
<!-- HorizontalAD -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-5698326622209671"
     data-ad-slot="6908948342"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Unity Version : 2021.3.5f1 </pre>



<div style="height:27px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size"><a href="https://docs.unity3d.com/kr/2019.4/Manual/script-AnimationWindowEvent.html" target="_blank" rel="noreferrer noopener">https://docs.unity3d.com/kr/2019.4/Manual/script-AnimationWindowEvent.html</a>  &lt;- 공식 문서</p>



<div style="height:33px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size"><a href="https://assetstore.unity.com/packages/3d/characters/humanoids/barbarian-warrior-75519">https://assetstore.unity.com/packag</a><a href="https://assetstore.unity.com/packages/3d/characters/humanoids/barbarian-warrior-75519" target="_blank" rel="noreferrer noopener">es/3d/characters/humanoids/barbarian-warrior-75519</a> &lt;- 테스트 에셋</p>



<div style="height:28px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1671" height="865" src="https://lycos7560.com/wp-content/uploads/image-732.png" alt="" class="wp-image-3510" srcset="https://lycos7560.com/wp-content/uploads/image-732.png 1671w, https://lycos7560.com/wp-content/uploads/image-732-300x155.png 300w, https://lycos7560.com/wp-content/uploads/image-732-768x398.png 768w, https://lycos7560.com/wp-content/uploads/image-732-1536x795.png 1536w" sizes="(max-width: 1671px) 100vw, 1671px" /></figure>



<div style="height:112px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">스크립트로 애니메이션 이벤트 추가</h2>



<p class="has-medium-font-size">바바리안 모델은 애니메이션 컨트롤러가 없다. (직접 만들어주자)</p>



<div style="height:34px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1774" height="890" src="https://lycos7560.com/wp-content/uploads/image-733.png" alt="" class="wp-image-3511" srcset="https://lycos7560.com/wp-content/uploads/image-733.png 1774w, https://lycos7560.com/wp-content/uploads/image-733-300x151.png 300w, https://lycos7560.com/wp-content/uploads/image-733-768x385.png 768w, https://lycos7560.com/wp-content/uploads/image-733-1536x771.png 1536w" sizes="(max-width: 1774px) 100vw, 1774px" /></figure>



<div style="height:73px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size">각 Idle, Walk의 애니메이션이 끝나면 이벤트를 실행 (Run과 RoundKick은 X )</p>



<div style="height:33px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using UnityEngine;

public class Test : MonoBehaviour
{
    private Animator ani;

    public AnimationClip Idle;
    public AnimationClip Walk;

    private void Awake()
    {
        this.ani = this.gameObject.GetComponent&lt;Animator>();

        this.Idle.AddEvent(new AnimationEvent()
        {

            time = Idle.length, // 애니메이션 클립의 길이를 받아서 이벤트 추가
            functionName = "FunctionIdle" // 함수의 이름과 같아야한다.
        });

        this.Walk.AddEvent(new AnimationEvent()
        {

            time = Walk.length,
            functionName = "FunctionWalk"
        });
    }

    private void FunctionIdle()
    {
        Debug.Log("Idle 실행");

    }

    private void FunctionWalk()
    {
        Debug.Log("Walk 실행");

    }
}
</pre>



<div style="height:78px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-video"><video height="1044" style="aspect-ratio: 1912 / 1044;" width="1912" controls muted src="https://lycos7560.com/wp-content/uploads/녹화_2022_12_22_12_05_43_779.mp4"></video></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--80)"/>



<h2 class="wp-block-heading">애니메이션에서 직접 이벤트 추가</h2>



<p class="has-medium-font-size">바바리안 애니메이션은 Read only라서 수정이 불가능하다. (이벤트 추가 X)</p>



<p class="has-medium-font-size">새로운 애니메이션을 만들고 Run을 복붙하면 수정가능하다. </p>



<div style="height:43px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1918" height="898" src="https://lycos7560.com/wp-content/uploads/image-736.png" alt="" class="wp-image-3519" srcset="https://lycos7560.com/wp-content/uploads/image-736.png 1918w, https://lycos7560.com/wp-content/uploads/image-736-300x140.png 300w, https://lycos7560.com/wp-content/uploads/image-736-768x360.png 768w, https://lycos7560.com/wp-content/uploads/image-736-1536x719.png 1536w" sizes="(max-width: 1918px) 100vw, 1918px" /></figure>



<div style="height:35px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using UnityEngine;

public class Test : MonoBehaviour
{
    private Animator ani;

    public AnimationClip Idle;
    public AnimationClip Walk;

    private void Awake()
    {
        this.ani = this.gameObject.GetComponent&lt;Animator>();

        this.Idle.AddEvent(new AnimationEvent()
        {

            time = Idle.length,
            functionName = "FunctionIdle"
        });

        this.Walk.AddEvent(new AnimationEvent()
        {

            time = Walk.length,
            functionName = "FunctionWalk"
        });
    }

    private void FunctionIdle()
    {
        Debug.Log("Idle 실행");

    }

    private void FunctionWalk()
    {
        Debug.Log("Walk 실행");

    }

    private void FunctionRun()
    {

        Debug.Log("Run 실행");
    }


}
</pre>



<div style="height:55px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-video"><video height="1072" style="aspect-ratio: 1912 / 1072;" width="1912" controls muted src="https://lycos7560.com/wp-content/uploads/녹화_2022_12_22_12_12_47_310.mp4"></video></figure>



<div style="height:84px" aria-hidden="true" class="wp-block-spacer"></div>



<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5698326622209671"
     crossorigin="anonymous"></script>
<ins class="adsbygoogle"
     style="display:block"
     data-ad-format="autorelaxed"
     data-ad-client="ca-pub-5698326622209671"
     data-ad-slot="4245812909"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">애니메이션 이벤트 파라미터 사용하기</h2>



<p class="has-medium-font-size"><a href="https://forum.unity.com/threads/how-to-use-multiple-param-in-animation-event.364138/" target="_blank" rel="noreferrer noopener">https://forum.unity.com/threads/how-to-use-multiple-param-in-animation-event.364138/</a> &lt;- 참고</p>



<div style="height:24px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using UnityEngine;

public class Test : MonoBehaviour
{
    private Animator ani;

    public AnimationClip Idle;

    private void Awake()
    {
        this.ani = this.gameObject.GetComponent&lt;Animator>();

        this.Idle.AddEvent(new AnimationEvent()
        {

            time = Idle.length,
            intParameter = 100,
            stringParameter = "바보",
            functionName = "FunctionIdle"

        }) ;
    }

    private void FunctionIdle(AnimationEvent myEvent)
    {
        Debug.Log("Idle 실행");
        Debug.Log(myEvent.intParameter); // 파라미터 사용
        Debug.Log(myEvent.stringParameter); // 파라미터 사용
    }

    private void FunctioasdnRun()
    {

        Debug.Log("Run 실행");
    }


}
</pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-video"><video height="972" style="aspect-ratio: 1912 / 972;" width="1912" controls muted src="https://lycos7560.com/wp-content/uploads/녹화_2022_12_22_12_44_27_389.mp4"></video></figure>



<div style="height:106px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">참고</h2>



<div style="height:22px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using System;
using System.Runtime.InteropServices;
using UnityEngine.Scripting;

namespace UnityEngine
{
    //
    // 요약:
    //     AnimationEvent lets you call a script function similar to SendMessage as part
    //     of playing back an animation.
    [Serializable]
    [StructLayout(LayoutKind.Sequential)]
    [RequiredByNativeCode]
    public sealed class AnimationEvent
    {
        internal float m_Time;

        internal string m_FunctionName;

        internal string m_StringParameter;

        internal Object m_ObjectReferenceParameter;

        internal float m_FloatParameter;

        internal int m_IntParameter;

        internal int m_MessageOptions;

        internal AnimationEventSource m_Source;

        internal AnimationState m_StateSender;

        internal AnimatorStateInfo m_AnimatorStateInfo;

        internal AnimatorClipInfo m_AnimatorClipInfo;

        [Obsolete("Use stringParameter instead")]
        public string data
        {
            get
            {
                return m_StringParameter;
            }
            set
            {
                m_StringParameter = value;
            }
        }

        //
        // 요약:
        //     String parameter that is stored in the event and will be sent to the function.
        public string stringParameter
        {
            get
            {
                return m_StringParameter;
            }
            set
            {
                m_StringParameter = value;
            }
        }

        //
        // 요약:
        //     Float parameter that is stored in the event and will be sent to the function.
        public float floatParameter
        {
            get
            {
                return m_FloatParameter;
            }
            set
            {
                m_FloatParameter = value;
            }
        }

        //
        // 요약:
        //     Int parameter that is stored in the event and will be sent to the function.
        public int intParameter
        {
            get
            {
                return m_IntParameter;
            }
            set
            {
                m_IntParameter = value;
            }
        }

        //
        // 요약:
        //     Object reference parameter that is stored in the event and will be sent to the
        //     function.
        public Object objectReferenceParameter
        {
            get
            {
                return m_ObjectReferenceParameter;
            }
            set
            {
                m_ObjectReferenceParameter = value;
            }
        }

        //
        // 요약:
        //     The name of the function that will be called.
        public string functionName
        {
            get
            {
                return m_FunctionName;
            }
            set
            {
                m_FunctionName = value;
            }
        }

        //
        // 요약:
        //     The time at which the event will be fired off.
        public float time
        {
            get
            {
                return m_Time;
            }
            set
            {
                m_Time = value;
            }
        }

        //
        // 요약:
        //     Function call options.
        public SendMessageOptions messageOptions
        {
            get
            {
                return (SendMessageOptions)m_MessageOptions;
            }
            set
            {
                m_MessageOptions = (int)value;
            }
        }

        //
        // 요약:
        //     Returns true if this Animation event has been fired by an Animation component.
        public bool isFiredByLegacy => m_Source == AnimationEventSource.Legacy;

        //
        // 요약:
        //     Returns true if this Animation event has been fired by an Animator component.
        public bool isFiredByAnimator => m_Source == AnimationEventSource.Animator;

        //
        // 요약:
        //     The animation state that fired this event (Read Only).
        public AnimationState animationState
        {
            get
            {
                if (!isFiredByLegacy)
                {
                    Debug.LogError("AnimationEvent was not fired by Animation component, you shouldn't use AnimationEvent.animationState");
                }

                return m_StateSender;
            }
        }

        //
        // 요약:
        //     The animator state info related to this event (Read Only).
        public AnimatorStateInfo animatorStateInfo
        {
            get
            {
                if (!isFiredByAnimator)
                {
                    Debug.LogError("AnimationEvent was not fired by Animator component, you shouldn't use AnimationEvent.animatorStateInfo");
                }

                return m_AnimatorStateInfo;
            }
        }

        //
        // 요약:
        //     The animator clip info related to this event (Read Only).
        public AnimatorClipInfo animatorClipInfo
        {
            get
            {
                if (!isFiredByAnimator)
                {
                    Debug.LogError("AnimationEvent was not fired by Animator component, you shouldn't use AnimationEvent.animatorClipInfo");
                }

                return m_AnimatorClipInfo;
            }
        }

        //
        // 요약:
        //     Creates a new animation event.
        public AnimationEvent()
        {
            m_Time = 0f;
            m_FunctionName = "";
            m_StringParameter = "";
            m_ObjectReferenceParameter = null;
            m_FloatParameter = 0f;
            m_IntParameter = 0;
            m_MessageOptions = 0;
            m_Source = AnimationEventSource.NoSource;
            m_StateSender = null;
        }

        internal int GetHash()
        {
            int num = 0;
            num = functionName.GetHashCode();
            return 33 * num + time.GetHashCode();
        }
    }
}</pre>



<div style="height:48px" aria-hidden="true" class="wp-block-spacer"></div>
<p>The post <a href="https://lycos7560.com/unity/unity-animationevent-parameter/3508/">Unity AnimationEvent AddEvent (스크립트/애니메이션/파라미터)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/unity/unity-animationevent-parameter/3508/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://lycos7560.com/wp-content/uploads/녹화_2022_12_22_12_05_43_779.mp4" length="6194523" type="video/mp4" />
<enclosure url="https://lycos7560.com/wp-content/uploads/녹화_2022_12_22_12_12_47_310.mp4" length="5443480" type="video/mp4" />
<enclosure url="https://lycos7560.com/wp-content/uploads/녹화_2022_12_22_12_44_27_389.mp4" length="2631472" type="video/mp4" />

			</item>
	</channel>
</rss>
