Skip to content

Notes in regard to Linux installation, configuration and maintenance.

Notifications You must be signed in to change notification settings

octopusthu/linux-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linux-notes

Notes and tips in regard to Linux installation, configuration and maintenance.

Current OS

  • Ubuntu 22.04 LTS

Must-Install Packages

zsh

  • Install Zsh
sudo apt install zsh

chsh
/bin/zsh
wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
REMOTE=https://gitee.com/mirrors/oh-my-zsh.git BRANCH=master sh install.sh
  • Edit ~/.zshrc to enable common plugins (such as docker) and include any startup scripts

Docker

Configurations

  • Configure Git
git config --global credential.helper 'store'
git config --global user.name "octopusthu"
git config --global user.email [email protected]
  • Set timezone
mv /etc/localtime /etc/localtime.backup
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

# Change to 24hr format (need re-login)
localectl set-locale LC_TIME=en_GB.UTF-8
  • Set hostname (For packages like sendmail to function)
    • hostnamectl set-hostname example.com
    • In /etc/hosts, assign the just updated hostname example.com to 127.0.0.1

SSH

  • Basic config
sudo vim /etc/ssh/sshd_config
    Port xxxxx
    PasswordAuthentication no
sudo systemctl restart sshd
  • Login using a non-root user with an RSA key via a customized port

client

ssh-keygen -t rsa

server

su - zy
mkdir ~/.ssh
vim ~/.ssh/authorized_keys
    pub key content
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
vim /etc/ssh/sshd_config
    Port xxxxx
    PasswordAuthentication no
    PermitRootLogin no
systemctl restart sshd

Unattended Upgrades

Archive

History OS

  • CentOS 7
  • CentOS 8
  • Ubuntu 20.04 LTS
  • Ubuntu 21.10

About

Notes in regard to Linux installation, configuration and maintenance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published