Ubuntu 환경에서 현재 Filesystem 사용량을 df 명령을 통해 알 수 있다.

아래의 예제로는 현재 159G의 용량을 사용가능하다.

$ df -h

Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 794M 9.7M 785M 2% /run /dev/sda2 184G 16G 159G 10% / tmpfs 3.9G 86M 3.8G 3% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup tmpfs 794M 48K 794M 1% /run/user/1000

$ df --help

Usage: df [OPTION]... [FILE]... Show information about the file system on which each FILE resides, or all file systems by default. Mandatory arguments to long options are mandatory for short options too. -a, --all include pseudo, duplicate, inaccessible file systems -B, --block-size=SIZE scale sizes by SIZE before printing them; e.g., '-BM' prints sizes in units of 1,048,576 bytes; see SIZE format below -h, --human-readable print sizes in powers of 1024 (e.g., 1023M) -H, --si print sizes in powers of 1000 (e.g., 1.1G) -i, --inodes list inode information instead of block usage -k like --block-size=1K -l, --local limit listing to local file systems --no-sync do not invoke sync before getting usage info (default) --output[=FIELD_LIST] use the output format defined by FIELD_LIST, or print all fields if FIELD_LIST is omitted. -P, --portability use the POSIX output format --sync invoke sync before getting usage info --total elide all entries insignificant to available space, and produce a grand total -t, --type=TYPE limit listing to file systems of type TYPE -T, --print-type print file system type -x, --exclude-type=TYPE limit listing to file systems not of type TYPE -v (ignored) --help display this help and exit --version output version information and exit Display values are in units of the first available SIZE from --block-size, and the DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables. Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set). The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000). FIELD_LIST is a comma-separated list of columns to be included. Valid field names are: 'source', 'fstype', 'itotal', 'iused', 'iavail', 'ipcent', 'size', 'used', 'avail', 'pcent', 'file' and 'target' (see info page). GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Full documentation at: <http://www.gnu.org/software/coreutils/df> or available locally via: info '(coreutils) df invocation'

'OS > Linux' 카테고리의 다른 글

[Ubuntu] Word Count  (0) 2017.01.19
[Ubuntu] Memory 확인  (0) 2017.01.19
[Ubuntu] Filesystem 용량 확인  (0) 2017.01.19
[Ubuntu] 커널버전 및 Ubuntu 버전 확인  (0) 2017.01.18
[Ubuntu] deb 파일 설치가 잘 안되는 경우  (0) 2017.01.05
[Jenkins] Jenkins 업데이트  (0) 2016.01.19
Posted by leechwin

Ubuntu 환경에서 커널버전 및 Ubuntu 버전을 확인하는 법에 대해 알아보자.

커널버전 알아보기

    $ uname -a Linux leechwin-linux 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ cat /proc/version Linux version 4.4.0-59-generic (buildd@lgw01-11) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017

Ubuntu 버전확인하기

    $ cat /etc/issue Ubuntu 16.04.1 LTS \n \l $ cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS" NAME="Ubuntu" VERSION="16.04.1 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.1 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial

참고로 /etc/issue 파일은 내부에서 콘솔 로그인시 출력해주는 메시지이다.

Posted by leechwin

Ubuntu 16.04이상에서 다운받은 deb 패키지 파일이 더블클릭으로 설치가 잘 안되는 경우가 있다.

이때 다음과 같은 방법으로 해결이 가능하다.

1.GDebi 패키지 설치

    • $ sudo apt-get install gdebi

    • open GDebi and click File -> Open and navigate to the downloaded DEB file.

2. Command line에서 다음과 같이 수행

    • $ sudo dpkg -i downloaded.deb $ sudo apt-get -f install

Reference: http://askubuntu.com/questions/760638/problem-with-deb-packages-on-ubuntu-16-04

Posted by leechwin