본문 바로가기

Linux19

[Ubuntu] apt update Error_1 위의 사진처럼 $ apt update시 에러 발생했을때, 에러 해결 방법. E: The repository http://dl.google.com/linux/linux/chrome/deb stable Release' does not have a Release file. 1. google.list 파일 수정 /etc/apt/sources.list.d 위치의 google.list 파일을 아래내용과 같이 수정한다.deb [arch=amd64] http:dl.google.com/linux/linux/chrome/deb/ stable main # 위 내용을 아래 처럼 수정. deb [arch=amd64] http:dl-ssl.google.com/linux/chrome/deb/ stable main 2 goo.. 2021. 9. 28.
[SSH] ssh나 telnet 접속시 메시지 띄우기 1. /etc 경로에 motd파일 작성 2. /etc/sshd/sshd_config 파일 수정 # PrintMotd no PrintMotd yesmotd파일 생성하는 sh파일 #!/bin/bash #define the filename to use as output motd="./motd" # Collect useful information about your system # $USER is automatically defined HOSTNAME=`uname -n` KERNEL=`uname -r` CPU=`uname -p` ARCH=`uname -m` # The different colours as variables Black="\033[0;30m" Red="\033[0;31m" Green="\033[0;.. 2021. 8. 3.
[vim] 내가 애용하는 .vimrc 설정 set nu : number의 약어. 라인넘버 보이게 set ai : auto indent의 약어. 자동 들여쓰기 set cin : cindent의 약어. c 스타일의 들여쓰기 set showmatch : 매칭되는 괄호를 하이라이팅 해줌 set ts=2 : tabstop의 약어. tab의 칸을 2칸으로 설정 set shiftwidth=2 : >> 또는 2021. 7. 30.
[Bash] #!/bin/sh 의 간단한 이야기. bash script 첫 줄에 보통 #!/bin/sh 라고 하는 주석문을 볼 수 있다. 하지만, 이때의 # 는 주석이 아니고 #! 라는 스크립트를 실행하는 쉘을 지정하는 선언문이다. 2021. 7. 30.
[Bash] 조건식 종류 [ -z ] : 문자열의 길이가 0이면 참 [ -n ] : 문자열의 길이가 0이 아니면 참 [ -eq ] : 값이 같으면 참 [ -ne ] : 값이 다르면 참 [ -gt ] : 값1 > 값2 [ -ge ] : 값1 >= 값2 [ -lt ] : 값1 < 값2 [ -le ] : 값1 2021. 7. 30.
[Ubuntu 18.04] 계정 추가하기. 1. 계정 만들기 $ adduser 2. 홈 디렉토리 변경 (선택) 2-1. /etc/passwd 직접 수정. $ vi /etc/passwd:x::::: 위와 같은 형태로 결과가 보여지면 수정하고 싶은 계정의 홈 디렉토리 부분을 수정하면 된다. 2-2. usermod 명령어 사용. $ usermod -d 2021. 7. 6.