본문 바로가기
728x90

환경변수7

[Linux]리눅스 사용자 환경설정 자동화: /etc/profile.d vs /etc/skel 차이와 활용법 개요HPC나 컴파일러 환경에서 특정 환경변수나 초기 설정을 사용자마다 반복 입력하지 않고 자동화하려면, 두 가지 방법을 주로 활용합니다✅ 시스템 전체 사용자에게 공통 적용: /etc/profile.d✅ 신규 사용자에게만 초기값으로 설정: /etc/skel이 글에서는 각각의 차이와 활용법, 그리고 Intel oneAPI와 같은 환경 설정을 예시로 정리해보겠습니다. 1. etc/profile.d - 시스템 전역 설정/etc/profile.d는 시스템 전체 사용자에게 공통적으로 적용되는 쉘 환경 설정 스크립트를 저장하는 디렉터리입니다./etc/profile이 실행될 때 내부에서 이 디렉터리의 .sh 파일들을 실행합니다.💡 적용 대상로그인 시 모든 사용자(ex ssh, su -)🧩 예시: Intel oneA.. 2025. 5. 13.
[Terraform] Windows에 Terraform 설치하기 개요테라폼을 Windows 환경에서 설치한다. 다운로드https://developer.hashicorp.com/terraform/install Install | Terraform | HashiCorp DeveloperExplore Terraform product documentation, tutorials, and examples.developer.hashicorp.com  설치압축 해제 후 나온 terraform.exe 파일을 C:\ 디렉터리에 옮긴다. Windows 환경 변수 등록하기내 컴퓨터 속성(단축키 : win + Pause)고급 시스템 설정 환경 변수 Path 편집환경 변수 등록Terraform CLI 테스트(CMD , Powershell 모두 실행) 2024. 12. 6.
[Linux_Ubuntu24.04] Module 설정(CUDA 설치 후 module 설정) 환경 모듈 설치sudo apt-get install environment-modules모듈 시스템 초기화source /etc/profile.d/modules.shenvironment module 설정파일 mkdir /usr/share/modules/modulefiles/cuda cp /usr/share/modules/modulefiles/modules /usr/share/modules/modulefiles/cuda/cuda-12.4 vi /usr/share/modules/modulefiles/cuda/cuda-12.4 ---- #%Module## modules modulefilemodule-whatis "cuda-12.4"prepend-path PATH /usr/local/cuda-12.4/.. 2024. 10. 25.
[NVIDIA] In use by another client(프로세스 충돌) ERR 로그# nvidia-smi --gpu-resetThe following GPUs could not be reset: GPU 00000000:B8:00.0: In use by another client1 device is currently being used by one or more other processes (e.g., Fabric Manager, CUDA application, graphics application such as an X server, or a monitoring application such as another instance of nvidia-smi). Please first kill all processes using this device and all compute .. 2024. 10. 18.
지역 변수 & 전역 변수 & 쉘 변수 & 매개 변수 쉘 변수(Shell Variables) !! 특징 쉘 환경에서 사용되는 내장 변수들입니다. 사용자 세션과 쉘의 동작을 제어하는데 사용됩니다. 예를 들어, PATH, HOME, USER와 같은 환경 변수들이 이에 속합니다. !! 활용도 시스템 환경을 설정하고, 쉘의 동작을 사용자의 필요에 맞게 조정하는 데 사용됩니다. 스크립트 내에서 시스템 경로나 사용자 정보 등을 참조할 때 활용됩니다. 지역변수(Local Variables) !! 특징 함수 내에서 선언되며, 해당 함수 내에서만 유효한 변수입니다. 함수 외부에서는 참조할 수 없으며, 함수가 종료되면 사라집니다. local 키워드를 사용하여 선언합니다 (bash에서) !! 활용도 함수 내에서 임시 데이터를 저장하거나, 함수의 실행 결과를 임시로 담기 위해 .. 2024. 2. 17.
환경변수 환경 변수란?프로세스가 컴퓨터에서 동작하는 방식에 영향을 미치는 동적인 값들의 모임OS 입장에서 해당 프로세스를 실행시키기 위해 참조하는 변수Path 변수는 운영체제가 어떤 프로세스를 실행 시킬 때, 그 경로를 찾는데 이용된다.PATH → /APP/enhpc/mpi/openmpi-4.1.6-gnu/bin:${PATH}리눅스에서는 이와 같이 경로를 입력해준다.윈도우 에서는 자바 초기 설정할 때 Path 설정을 생각하면 된다.환경 변수 읽는 순서(export)~~/etc/rc.d/rc.sysinit > /etc/rc.d/rcN.d (N은 0~6 사이)~~ > /etc/rc.d/rc.local > /etc/profile > /etc/profile.d/* > /etc/bashrc > /etc/inputrc > .. 2024. 1. 22.
728x90