차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
linuxfromscratch [2024/06/07 19:41] – [Binutils 설치하기 전에 ISL 설치하기 (실패)] baecylinuxfromscratch [2024/06/16 23:14] (현재) – [PS1 설정] baecy
줄 1: 줄 1:
-====== Linux From Scratch ======+===== 토막 상식 =====
  
 +==== for, echo and sed =====
 +
 +<code bash>
 +for i in $(echo "ldapadd, ldapcompare, ldapdelete, ldapexop, ldapmodify, slapschema, slaptest" | sed 's/,/ /g') ; do find /usr/bin -type f -name $i ; done
 +</code>
 ==== Grep && Tar ==== ==== Grep && Tar ====
  
줄 168: 줄 173:
 PS1_USER='\[$(tput setaf 75)\][ \[$(tput sgr0)\]\w \[$(tput setaf 75)\]] \[$(tput sgr0)\]\$\n' PS1_USER='\[$(tput setaf 75)\][ \[$(tput sgr0)\]\w \[$(tput setaf 75)\]] \[$(tput sgr0)\]\$\n'
 PS1_HEAD='\[$(tput setaf 229)\]\u\[$(tput setaf 199)\]@\[$(tput setaf 215)\]\h ' PS1_HEAD='\[$(tput setaf 229)\]\u\[$(tput setaf 199)\]@\[$(tput setaf 215)\]\h '
-if [ "$(awk '$5=="/" {print $1}' </proc/1/mountinfo)" != "$(awk '$5=="/" {print $1}' </proc/$$/mountinfo)" ] ; th +if [ "$(awk '$5=="/" {print $1}' </proc/1/mountinfo)" != "$(awk '$5=="/" {print $1}' </proc/$$/mountinfo)" ] ; then
-en                                                                                                                +
     if [ $(id -u) -eq 0 ] ; then     if [ $(id -u) -eq 0 ] ; then
         PS1="<Chroot>${PS1_HEAD}${PS1_ROOT}"         PS1="<Chroot>${PS1_HEAD}${PS1_ROOT}"
     else     else
-        PS1="<Chroot>${PS1_HEAD}${PS1_USER}"                                                                      +        PS1="<Chroot>${PS1_HEAD}${PS1_USER}"
     fi     fi
 else else
     if [ $(id -u) -eq 0 ] ; then     if [ $(id -u) -eq 0 ] ; then
-        PS1="${PS1_HEAD}${PS1_ROOT}"                                                                              +        PS1="${PS1_HEAD}${PS1_ROOT}"
     else     else
         PS1="${PS1_HEAD}${PS1_USER}"         PS1="${PS1_HEAD}${PS1_USER}"
줄 189: 줄 193:
 LFS 진행에 필요한 패키지 설치 LFS 진행에 필요한 패키지 설치
  
-<codelang=bash >+<code bash >
 sudo apt install build-essentials bison gawk m4 texinfo texinfo  ## 필수 사항 sudo apt install build-essentials bison gawk m4 texinfo texinfo  ## 필수 사항
 sudo apt install gettext libisl-dev                              ## 선택 사항 sudo apt install gettext libisl-dev                              ## 선택 사항
줄 344: 줄 348:
 ---- ----
 ==== Swap file ==== ==== Swap file ====
 +
 <code cmd=true cmdout=6,7> <code cmd=true cmdout=6,7>
 export LFS=/mnt/lfs export LFS=/mnt/lfs
줄 353: 줄 358:
 no label, UUID=890ba9a5-da48-4374-84ce-b71b91863e00 no label, UUID=890ba9a5-da48-4374-84ce-b71b91863e00
 sudo swapon $LFS_SWAP sudo swapon $LFS_SWAP
-sudo echo "$LFS_SWAP  swap  swap  defaults  0  0" >> /etc/fstab</code>\\+sudo echo "$LFS_SWAP  swap  swap  defaults  0  0" >> /etc/fstab 
 +</code>
  
 +----
 ==== Binutils 설치하기 전에 ISL 설치하기 ==== ==== Binutils 설치하기 전에 ISL 설치하기 ====
  
줄 378: 줄 385:
  
 ---- ----
-==== BLFS 시작하기 전에 필요한 패키지 ==== 
-sudo, nfs-utils(또는 sshfs), openssh, wget 
  
 ==== $LFS/sources에서 디렉토리 검색 ==== ==== $LFS/sources에서 디렉토리 검색 ====
 +
 <code lang=bash> <code lang=bash>
 alias dirfind="find -mindepth 1 -maxdepth 1 -type d | sed 's@^./@@'" alias dirfind="find -mindepth 1 -maxdepth 1 -type d | sed 's@^./@@'"
줄 387: 줄 393:
 rm -rf $(dirfind)  ## 설치 완료된 소스 디렉토리 삭제 rm -rf $(dirfind)  ## 설치 완료된 소스 디렉토리 삭제
 ## 설치 완료된 패키지 디렉토리만 삭제할거면 다음과 같이 ## 설치 완료된 패키지 디렉토리만 삭제할거면 다음과 같이
-alias SearchAndDestroy='find -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;'</code> \\+alias SearchAndDestroy='find -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;' 
 +</code>
  
 +----
 ==== SBU 측정 ==== ==== SBU 측정 ====
 <code lang=bash> <code lang=bash>
  • linuxfromscratch.1717789273.txt.gz
  • 마지막으로 수정됨: 2024/06/07 19:41
  • 저자 baecy