Thursday, November 7, 2019

Linux Command

//basic command

touch, 
more, 
less, 
file,
shutdown [options][time],
man [option]...[page][command]


//사용자

adduser [options] [--home DIR] [--shell SHELL] [--disabled-password] [--disabled-login] 
user
useradd - user add with default (none-dialog 방식) / adduser의아래레벨실행파일
chage
passwd
deluser

//사용자 그룹

addgroup
groupadd
delgroup
usermod

//파일의 권한

umask
chmod
chown

//Release List

https://downloads.raspberrypi.org/NOOBS/images/

//OS version Check

$ cat /etc/os-release
$ uname -a

$ apt --fix-broken install

//directory

delete directory recursively
$ rm -r directory

directory structure
. : self
.. : parents
! : home
- : before

//link

softlink : $ ln -s hello.txt hellosymlink
hardlink : $ ln hello.txt hellolink
$ ls -ali
* concept of inode ?

//apt source change

$ sudo nano /etc/apt/sources.list


//Find

sudo find / -name "filename"
sudo find ./ \(-name 'filename1' -o -name 'filename2'\)


//Extract all zip files in a folder

depending on extension
find . -name '*.bz2' -exec tar xvf {} \;
or
find . -name '*.zip' -exec unzip {} \;

//KOREAN FONTS

sudo apt-get -y install ibus-hangul
sudo apt-get -y install ttf-unfonts-core
or
sudo apt-get install fonts-unfonts-core

//FTP setting??


//Multi User

Text Terminal : Ctrl+Alt+F1~F6
GUI Terminal : Ctrl+Alt+F7

GUI -> CUI : Ctrl + Alt  F1 ~ F6  // CUI화면간 이동
CUI -> GUI : Alt + F7   // GUI창으로 이동



// 계정 사용시 root 에 사용할 비밀번호 등록 (한번만 등록하면 됨)

$ sudo passwd root
$ su


FTP setting

//install vsftpd
sudo apt-get install vsftpd

//vsftpd.conf modification
sudo vi /etc/vsftpd.conf
   (delete #...)
   anonymous_enable=NO
   local_enable=YES
   write_enable=YES
   local_umask=022
   chroot_local_user=YES
   chroot_list_enable=YES
   chroot_list_file=/etc/vsftpd.chroot_list

//user registering
sudo vi /etc/vsftpd.chroot_list
//and then input user(ex. pi) and save and exit

//restart vsftpd
sudo service vsftpd restart
or
sudo systemctl restart vsftpd

//autobatch when booting
sudo systemctl enable vsftpd

//check status
sudo systemctl status


No comments:

Post a Comment