리눅스 / 명령어 / free / 메모리 사용량 확인하는 명령어

free는 메모리 사용량을 확인하는 명령어이다.

  • free
# free
               total        used        free      shared  buff/cache   available
Mem:         3734312      926288     2786196       21448      259940     2808024
Swap:        4145148           0     4145148
  • free --mega
    메가바이트 단위로 표시한다.
# free --mega
               total        used        free      shared  buff/cache   available
Mem:            3823         948        2853          21         266        2875
Swap:           4244           0        4244
  • free --giga
    기가바이트 단위로 표시한다.
# free --giga
               total        used        free      shared  buff/cache   available
Mem:               3           0           2           0           0           2
Swap:              4           0           4
  • free -h
    사람이 읽기 편하게 표시한다.
# free -h
               total        used        free      shared  buff/cache   available
Mem:           3.6Gi       904Mi       2.7Gi        20Mi       253Mi       2.7Gi
Swap:          4.0Gi          0B       4.0Gi
  • free --help
    도움말을 표시한다.
# free --help

Usage:
 free [options]

Options:
 -b, --bytes         show output in bytes
     --kilo          show output in kilobytes
     --mega          show output in megabytes
     --giga          show output in gigabytes
     --tera          show output in terabytes
     --peta          show output in petabytes
 -k, --kibi          show output in kibibytes
 -m, --mebi          show output in mebibytes
 -g, --gibi          show output in gibibytes
     --tebi          show output in tebibytes
     --pebi          show output in pebibytes
 -h, --human         show human-readable output
     --si            use powers of 1000 not 1024
 -l, --lohi          show detailed low and high memory statistics
 -t, --total         show total for RAM + swap
 -s N, --seconds N   repeat printing every N seconds
 -c N, --count N     repeat printing N times, then exit
 -w, --wide          wide output

     --help     display this help and exit
 -V, --version  output version information and exit

For more details see free(1).

 

같은 카테고리의 다른 글
Rocky Linux 8 / SELinux 끄는 방법

Rocky Linux 8 / SELinux 끄는 방법

상태 확인 켜진 상태라면 Enforcing, 꺼진 상태라면 Permissive를 출력한다. getenforce 방법 1 다음과 같이 명령하면 SELinux가 꺼진다. 재부팅하면 다시 SELinux가 켜진다. setenforce 0 만약 다시 SELinux를 사용하고 싶다면 다음과 같이 명령한다. setenforce 1 방법 2 /etc/selinux/config에 다음과 같은 코드가 있다. SELINUX=enforcing 다음과 같이 바꾼다. SELINUX=disabled 시스템을 재부팅하면 적용된다. 방법 1과는 달리 재부팅해도 설정이 유지된다.

Ubuntu 16.04 / phpMyAdmin / 특정 IP에서만 접속 가능하게 만드는 방법

우분투 16.04에서 phpMyAdmin을 패키지로 설치했을 때, 기본 설정은 모든 IP에서 접속 가능입니다. 만약 특정 IP에서만 접속 가능하게 하려면 /etc/apache2/conf-available/phpmyadmin.conf에 다음 코드를 추가합니다. <Directory /usr/share/phpmyadmin> Order deny,allow Deny from all Allow from xxx.xxx.xxx.xxx </Directory> xxx.xxx.xxx.xxx는 접속하려는 IP로 바꿉니다. 여러 IP를 설정하고 싶을 때는 띄어쓰기로 구분합니다. <Directory /usr/share/phpmyadmin> Order deny,allow Deny from all ...

Ubuntu 22.04 Server / 원격 데스크톱으로 연결하는 방법

Ubuntu 22.04 Server / 원격 데스크톱으로 연결하는 방법

GUI 설치 우분투에 GUI를 설치한다. # apt install ubuntu-desktop-minimal xrdp 설치 xrdp를 설치한다. # apt install xrdp 방화벽 설정 원격 데스크톱은 3389 포트를 사용하므로, 방화벽을 사용하고 있다면 포트를 열어 준다. ufw allow 3389/tcp 원격 데스크톱 연결 원격 데스크톱으로 접속한다. 아래와 같은 창이 뜨는데, 를 클릭한다. 계정 정보를 입력하고 를 클릭하면... 원격지에서 GUI로 우분투를 즐길 수 있다.

리눅스 / 배포판 / 리눅스 민트(Linux Mint) - 역사, 특징, 장점

리눅스 민트의 역사 리눅스 민트(Linux Mint)는 2006년에 클레멘트 르페브르(Clement Lefebvre)가 시작한 리눅스 배포판입니다. 초기에는 우분투(Ubuntu) 기반으로 시작했으며, 이후 사용자가 쉽고 편리하게 사용할 수 있는 운영체제를 목표로 발전해왔습니다. 리눅스 민트는 특히 윈도우 사용자가 쉽게 전환할 수 있도록 직관적인 인터페이스와 다양한 멀티미디어 코덱을 기본으로 제공하는 것으로 유명합니다. 리눅스 민트의 특징 사용자 친화적 인터페이스 리눅스 민트는 특히 ...

CentOS / 버전 확인하는 방법

CentOS / 버전 확인하는 방법

cat /etc/redhat-release # cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) cat /etc/*release* # cat /etc/*release* CentOS Linux release 7.4.1708 (Core) Derived from Red Hat Enterprise Linux 7.4 (Source) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" CentOS Linux release 7.4.1708 (Core) CentOS Linux release 7.4.1708 (Core) cpe:/o:centos:centos:7

Ubuntu Server 22.04 / vsftpd로 FTP 서버 구축하기

vsftpd vsftpd(Very Secure FTP Daemon)는 유닉스와 리눅스에서 사용할 수 있는 가벼운 FTP 서버입니다. 주요 특징은 다음과 같습니다. Virtual IP configurations Virtual users Standalone or inetd operation Powerful per-user configurability Bandwidth throttling Per-source-IP configurability Per-source-IP limits IPv6 Encryption support through SSL integration 설치 vsftpd는 우분투 패키지에 포함되어 있으므로 다음과 같이 명령하여 설치할 수 있습니다. # apt install vsftpd 방화벽을 사용 중이라면 다음과 같이 명령하여 포트를 ...

CentOS 7 / Apache, PHP, MariaDB 설치하는 방법

CentOS 7 / Apache, PHP, MariaDB 설치하는 방법

CentOS에 Apache, PHP, MariaDB를 설치하는 방법을 간략히 정리합니다. APM 설치 Apache, PHP, MariaDB을 설치합니다. yum install httpd php mariadb-server php-mysql 서비스 설정 Apache가 부팅 시 자동으로 시작되도록 합니다. systemctl enable httpd.service MariaDB가 부팅 시 자동으로 시작되도록 합니다. systemctl enable mariadb.service Apache를 시작합니다. systemctl start httpd.service MariaDB를 시작합니다. systemctl start mariadb.service 방화벽 설정 http로 접속할 수 있도록 포트를 열어줍니다. firewall-cmd --permanent --add-service=http https로 접속할 수 있도록 포트를 ...

리눅스 / 명령어 / 연산자 - ;, &&, ||

리눅스 셸에서 ;, &&, || 는 명령어 실행 방식을 제어하는 연산자입니다. 각 기호의 의미와 사용법은 다음과 같습니다.

리눅스 / 명령어 / cd / 다른 디렉토리로 이동하는 명령어

cd는 change directory의 약자로, 다른 디렉토리로 이동하는 명령어이다. cd 현재 로그인한 사용자의 홈 디렉토리로 이동한다. 일반적으로 root 계정이라면 /root로, 사용자 jb 계정이라면 /home/jb로 이동한다. cd ~user user의 홈 디렉토리로 이동한다. 다음과 같이 명령하면 jb 사용자의 홈 디렉토리로 이동한다. # cd ~jb cd 디렉토리명 지정한 디렉토리로 이동한다. 절대경로, 상대경로 다 사용할 수 있다. 다음과 같이 명령하면 /etc 디렉토리로 이동한다. # cd /etc 현재 ...

리눅스 / 명령어 / cal / 달력을 출력하는 명령어

cal은 달력을 출력하는 명령어이다. 아무 옵션 없이 사용하면 현재 날짜가 속한 달의 달력을 출력한다. cal October 2022 Su Mo Tu We Th Fr Sa 1 2 3 4 5 ...