欢迎光临散文网 会员登陆 & 注册

Udemy高分付费 2022 面向初学者的完整 Linux 管理训练营(Ubun

2022-08-18 12:38 作者:我命我掌控  | 我要投稿



// terminal code:

code




// open a new terminal window

Ctrl + Alt + T




ls


who


whoami


ip add


.sa


ps



sudo apt update && sudo apt install terminator







3.2. Linux Command Structure P9 - 00:19


ping -c 1 8.8.8.8


ping -c 1 127.0.0.1


ping -c 10 8.8.8.8




ls


ls -l -h -all



// storages

df


df -h







3.3. Getting Help, Man Pages (man, type, help, apropos) P10 - 00:42


man


man ls






ifconfig



cat /etc/passwd


cat .bash_history


cat $HISTORYSIZE


history





sodu su


su





// add a new user: methon1

sudo useradd user1



// add to sudo user list: to use sudo cmd

adduser user1 sudo




// methon2 (recommended)

// add a new user & creat folder

adduser user2




// add to sudo user list: to use sudo cmd

adduser user2 sudo



// change password

sudo passwd root







5.1. Intro to The Linux Files System P17 - 01:27






// CPU information

cat /proc/cpuinfo


// Memory

cat /proc/meminfo





touch linux.txt


stat linux.txt





less /proc/meminfo



tail /proc/meminfo


// check last 2 line on a file

tail -n 2 /proc/meminfo







tar -czvf etc.tar.gz /etc/





apt install build-essential


gcc --version
g++ --version







15.7. Compiling C Programs P85 - 02:38


vim hello.c



gcc hello.c -o hello
./hello






19.5. Diving into the DNS Protocol and Installing a DNS Server (Bind9) P98 - 03:10


apt install bind9 bind9utils bind9-doc
systemctl status bind9





// setting a alias

alias c="clear"





echo $0


cat /etc/shells


// run shell script

./script.sh





// setting up a ssh connection

// whatever a diratory in your local client (windows11) 

// run cmd.exe: 

ssh-keygen 





// copy file to linux server 

// note: remove my folder: C:\Users\Administrator\.ssh>

C:\Users\Administrator\.ssh>scp windows11_id_rsa.pub root@xx.xxx.x.xx:~/.ssh 




// login your server with password this time

ssh root@xx.xxx.x.xx





// get into your server's .ssh folder

cd .ssh




//copy public key file to the configuration file of ssh

cat windows11_id_rsa.pub >> authorized_keys 





// login your server with private key 

ssh root@xx.xxx.x.xx -i "C:\Users\Administrator\.ssh\windows11_id_rsa" 



// note: use private key as password to login your server with public key 

// server use your public key to encrypt data, so you use private key open it. 


done 




one more thing:

// create a file: root.bat

// run it, login, without password and '-i "C:\Users\Administrator\.ssh\windows11_id_rsa" '

ssh root@xxx.xx.x.xx





Udemy高分付费 2022 面向初学者的完整 Linux 管理训练营(Ubun的评论 (共 条)

分享到微博请遵守国家法律