리눅스 / CD, ISO 마운트하는 방법

CD 마운트

마운트할 디렉토리 생셩

mkdir /aaa

마운트

# mount /dev/cdrom /aaa
mount: /aaa: WARNING: source write-protected, mounted read-only.

마운트 해제

umount /aaa

ISO 마운트

마운트할 디렉토리 생셩

mkdir /aaa

마운트

mount /root/Disc.iso /aaa -o loop
mount: /aaa: WARNING: source write-protected, mounted read-only.

마운트 해제

umount /aaa
같은 카테고리의 다른 글

리눅스 / 명령어 / ls / 디렉토리와 파일 목록 출력하는 명령어

ls는 list의 약어로, 디렉토리와 파일 목록을 출력하는 명령어이다. ls 디렉토리명 디렉토리에 속한 디렉토리와 파일 목록을 출력한다. 숨김 파일은 나오지 않는다. 디렉토리명을 생략하면 현재 디렉토리에 속한 디렉토리와 파일 목록을 출력한다. 예를 들어 다음과 같이 명령하면 /var 디렉토리에 속한 디렉토리와 파일 목록을 출력한다. # ls /var ls -a, ls -l -a 옵션을 붙이면 숨김 파일도 출력한다. -l 옵션을 붙이면 소유자, 파일 ...

리눅스 / 명령어 / which, whereis, locate / 명령어 위치 찾기

명령어의 위치를 찾을 때 사용할 수 있는 명령어에는 which, whereis, locate가 있다. 명령어의 위치만 찾을 때는 which를 사용하고, 관련된 파일들의 위치까지 찾을 때는 whereis나 locate를 사용한다. which 명령어로 find 명령어를 찾는다. # which find /usr/bin/find whereis 명령어로 find 명령어를 찾는다. # whereis find find: /usr/bin/find /usr/share/man/man1/find.1.gz locate 명령어로 find 명령어를 찾는다. # locate find /usr/bin/find /usr/bin/find2perl /usr/bin/findmnt /usr/bin/nl-link-ifindex2name /usr/bin/nl-link-name2ifindex /usr/bin/oldfind /usr/lib64/python2.7/modulefinder.py /usr/lib64/python2.7/modulefinder.pyc /usr/lib64/python2.7/modulefinder.pyo /usr/sbin/btrfs-find-root /usr/sbin/findfs /usr/share/bash-completion/completions/findmnt /usr/share/doc/findutils-4.5.11 /usr/share/doc/findutils-4.5.11/AUTHORS /usr/share/doc/findutils-4.5.11/COPYING /usr/share/doc/findutils-4.5.11/ChangeLog /usr/share/doc/findutils-4.5.11/NEWS /usr/share/doc/findutils-4.5.11/README /usr/share/doc/findutils-4.5.11/THANKS /usr/share/doc/findutils-4.5.11/TODO /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_find.py /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_stop_find.py /usr/share/info/find-maint.info.gz /usr/share/info/find.info.gz /usr/share/locale/be/LC_MESSAGES/findutils.mo /usr/share/locale/bg/LC_MESSAGES/findutils.mo /usr/share/locale/ca/LC_MESSAGES/findutils.mo /usr/share/locale/cs/LC_MESSAGES/findutils.mo /usr/share/locale/da/LC_MESSAGES/findutils.mo /usr/share/locale/de/LC_MESSAGES/findutils.mo /usr/share/locale/el/LC_MESSAGES/findutils.mo /usr/share/locale/eo/LC_MESSAGES/findutils.mo /usr/share/locale/es/LC_MESSAGES/findutils.mo /usr/share/locale/et/LC_MESSAGES/findutils.mo /usr/share/locale/fi/LC_MESSAGES/findutils.mo /usr/share/locale/fr/LC_MESSAGES/findutils.mo /usr/share/locale/ga/LC_MESSAGES/findutils.mo /usr/share/locale/gl/LC_MESSAGES/findutils.mo /usr/share/locale/hr/LC_MESSAGES/findutils.mo /usr/share/locale/hu/LC_MESSAGES/findutils.mo /usr/share/locale/id/LC_MESSAGES/findutils.mo /usr/share/locale/it/LC_MESSAGES/findutils.mo /usr/share/locale/ja/LC_MESSAGES/findutils.mo /usr/share/locale/ko/LC_MESSAGES/findutils.mo /usr/share/locale/lg/LC_MESSAGES/findutils.mo /usr/share/locale/lt/LC_MESSAGES/findutils.mo /usr/share/locale/ms/LC_MESSAGES/findutils.mo /usr/share/locale/nl/LC_MESSAGES/findutils.mo /usr/share/locale/pl/LC_MESSAGES/findutils.mo /usr/share/locale/pt/LC_MESSAGES/findutils.mo /usr/share/locale/pt_BR/LC_MESSAGES/findutils.mo /usr/share/locale/ro/LC_MESSAGES/findutils.mo /usr/share/locale/ru/LC_MESSAGES/findutils.mo /usr/share/locale/rw/LC_MESSAGES/findutils.mo /usr/share/locale/sk/LC_MESSAGES/findutils.mo /usr/share/locale/sl/LC_MESSAGES/findutils.mo /usr/share/locale/sr/LC_MESSAGES/findutils.mo /usr/share/locale/sv/LC_MESSAGES/findutils.mo /usr/share/locale/tr/LC_MESSAGES/findutils.mo /usr/share/locale/uk/LC_MESSAGES/findutils.mo /usr/share/locale/vi/LC_MESSAGES/findutils.mo /usr/share/locale/zh_CN/LC_MESSAGES/findutils.mo /usr/share/locale/zh_TW/LC_MESSAGES/findutils.mo /usr/share/man/man1/find.1.gz /usr/share/man/man1/find2perl.1.gz /usr/share/man/man1/oldfind.1.gz /usr/share/man/man8/btrfs-find-root.8.gz /usr/share/man/man8/findfs.8.gz /usr/share/man/man8/findmnt.8.gz locate 명령어는 -n 옵션으로 출력 ...

Ubuntu 22.04 Server / SSH / 포트 변경하는 방법

보안 상의 이유로 SSH 포트는 변경하는 것이 좋다. Ubuntu 22.04 Server에서 SSH 포트 변경하는 방법은 다음과 같다. 1980으로 변경한다고 가정한다. /etc/ssh/sshd_config에서 다음의 코드를... #Port 22 다음으로 변경한다. Port 1980 방화벽이 활성화되어 있다면 1980 포트를 열어준다. ufw allow 1980/tcp SSH 서비스를 다시 시작한다. systemctl restart ssh SSH 서비스를 다시 시작해도 적용되지 않으면, 컴퓨터를 다시 시작한다.

Ubuntu Server / Let’s Encrypt 무료 SSL 인증서 발급 받기

Ubuntu Server에서 Apache Web Server를 사용하는 경우 Let’s Encrypt 인증서 발급 받는 방법이다. Apache용 Certbot 설치 Ubuntu Server 20.04, Ubuntu Server 22.04 snap install core snap refresh core snap install --classic certbot ln -s /snap/bin/certbot /usr/bin/certbot Ubuntu Server 18.04 apt install software-properties-common add-apt-repository universe add-apt-repository ppa:certbot/certbot apt update apt upgrade apt install certbot python3-certbot-apache Ubuntu Server 16.04 add-apt-repository ppa:certbot/certbot apt update apt upgrade apt install python-certbot-apache 인증서 발급 abc.com 인증서 ...

Ubuntu 16.04 Server / 고정 IP 설정하는 방법

네트워크 설정 파일은 /etc/network/interfaces이다. 우분투를 DHCP로 설치했다면 설정 파일의 내용은 다음과 비슷하게 되어 있다. # The primary network interface auto enp0s3 iface enp0s3 inet dhcp 이를 다음처럼 변경하고 저장한다. xxx.xxx.xxx.xxx는 네트워크 환경에 맞게 수정한다. # The primary network interface auto enp0s3 iface enp0s3 inet static address xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gateway xxx.xxx.xxx.xxx dns-nameservers xxx.xxx.xxx.xxx 다음과 같이 명령하여 네트워크를 재시작한다. systemctl restart networking.service 만약 위와 같이 해도 ...

리눅스 / 명령어 / alias / 명령어 별칭 만들기

긴 명령어 또는 복잡한 명령어를 자주 사용한다면 alias를 사용하자. 시간을 많이 절약할 수 있다. alias 목록 보기 alias를 실행하면 현재 등록된 alias를 출력한다. alias 예를 들어 ll을 실행한다는 것은 ls -alF를 실행하는 것과 같다. alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' alias 만들기 alias는 다음과 같이 만든다. abc를 실행하는 ...

CentOS Stream 8 / 설치하기

CentOS Stream 8 / 설치하기

다운로드 CentOS Stream 페이지로 접속한다. 을 선택한다. 시스템에 맞는 링크를 클릭한다. 가까운 미러 리스트가 나오는데, 적당한 것을 클릭한다. 보통 네이버나 카카오가 빠르다. CentOS-Stream-8-x86_64-20210927-boot.iso 또는 CentOS-Stream-8-x86_64-20210927-dvd1.iso를 다운로드 한다. 설치 물리적 기기라면 부팅 가능한 USB를 만들어서, 가상 머신이라면 ISO 파일을 이용해서 부팅한다. Install CentOS Stream 8-stream을 선택하고 엔터키를 누른다. 언어를 선택하고 를 클릭한다. 빨간색 경고를 다 해결해야 설치가 진행된다. Network & Host Name을 ...

리눅스 / 배포판 / 페도라(Fedora) - 역사, 특징, 장점

페도라의 역사 페도라(Fedora)는 2003년 11월 6일에 첫 번째 버전이 출시되었습니다. 페도라는 레드햇(Red Hat)의 커뮤니티 주도 프로젝트로 시작되었으며, 레드햇 엔터프라이즈 리눅스(RHEL)의 기반이 됩니다. 페도라는 최신 기술과 소프트웨어를 빠르게 채택하고 배포하는 것을 목표로 하며, 개발자와 파워 유저들에게 인기가 많습니다. 레드햇과의 관계 페도라는 레드햇의 후원을 받으며, 페도라 프로젝트는 레드햇이 주도하지만, 커뮤니티가 중요한 역할을 합니다. 레드햇은 페도라에서 ...

Rocky Linux 9 / Apache, PHP, MariaDB 설치

Rocky Linux 9 / Apache, PHP, MariaDB 설치

Apache 설치 Apache를 설치한다. dnf install httpd httpd를 시작한다. systemctl start httpd 시스템 재부팅 후에도 자동으로 시작되게 하고 싶다면 다음과 같이 명령한다. systemctl enable httpd 방화벽 설정 http, 즉 80 포트를 연다. firewall-cmd --permanent --add-service=http https, 즉 443 포트를 연다. firewall-cmd --permanent --add-service=https 방화벽을 다시 로드한다. firewall-cmd --reload 테스트 웹브라우저로 서버 IP에 접속한다. 다음과 같이 나오면 제대로 설치되고 시작된 것이다. PHP 설치 PHP를 설치한다. dnf install php Apache를 다시 시작한다. systemctl restart ...

CentOS 7 / mod_security 설치하는 방법

CentOS 7 / mod_security 설치하는 방법

mod_security는 아파치 웹서버에 사용할 수 있는 방화벽 모듈입니다. ModSecurity is an open source, cross-platform web application firewall (WAF) module. Known as the "Swiss Army Knife" of WAFs, it enables web application defenders to gain visibility into HTTP(S) traffic and provides a power rules language and API to implement advanced protections. 설치 yum install ...