Linux Wiki
Linux WikiGeneral OSShellHow to install and swtich to shell? # print current shell echo $SHELL # print installed shells cat /etc/shells # switch to specific shell,such as zsh sudo yum install -y zsh chsh -s /bin/zsh How to install oh-my-zsh? # Via curl sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # Via wget sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" Keymap Ctrl# swap Caps and Ctrl sudo nano /etc/profile setxkbmap -option ctrl:swapcaps # or just map Caps to Ctrl (Recommended) sudo nano /etc/default/keyboard # update XKBOPTIONS="ctrl:nocaps" Wifi Connect of XIAOMIsudo nano /etc/modprobe.d/blacklist.conf Append CentOS 7HostnameIn CentOS,there are three type of hostnames:
In centOS 7,it offers a # set hostname as 'jk' hostnamectl -set-hostname jk # more about hostnamectl hostnamectl -h How to update New User & AuthorizationHow to add a new user? # new user 'jack' adduser jack # set passwd passwd jack How to add authorization? Note that,the new user don‘t have the permission of ## Allow root to run any commands anywhere root ALL=(ALL) ALL jack ALL=(ALL) ALL # authorize 'jack' EPELEPEL,i.e. Extra Packages for Enterprise Linux,is maintained by Fedora and having no conllisions of Offical Package. # RHEL/CentOS7 install EPEL yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # Query & Update ll /etc/yum.repos.d/ yum clean all && yum makecache How to Install NodejsSource Codes Compile # install gcc , gcc-c++ yum -y install gcc gcc-c++ # download the corresponding source code wget https://nodejs.org/dist/v10.15.1/node-v10.15.1.tar.gz # extract it to current folder tar -zxvf node-v10.15.1.tar.gz # cd 'node-v10.15.1' cd node-v10.15.1 # make & install ./configure --prefix=/usr/local/node make && make install # set PATH export PATH=$PATH:/usr/local/node/bin Archive Installation # download the newest archive package wget https://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.xz # extract xz -d node-v10.15.1-linux-x64.tar.xz tar -xvf node-v10.15.1-linux-x64.tar # move it to a specific folder,like '/opt' mv node-v10.15.1 /opt/node # set PATH export PATH=$PATH:/opt/node/bin Taobao Mirror # temporary npm --registry https://registry.npm.taobal.org install xxx # permanent npm config set registry https://registry.npm.taobao.org Via How to install Python3.x# install commpile tools,such as 'gcc' 'g++' yum -y install gcc gcc-c++ # necessary libs yum -y install zlib zlib-devel yum -y install libffi-devel Source Code Installation # download source code package wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz # extract tar -zxvf python-3.7.2 # make & install cd python-3.7.2 ./configure --prefix=/usr/local/python3 make && make install # set PATH export PATH=$PATH:/usr/local/python3/bin How to Install Git# install a compile tool yum install perl-devel # download & extract source code wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.xz xz -d git-2.9.5.tar.xz tar -xvf git-2.9.5.tar # make & install cd git-2.9.5 make && make install # set PATH export PATH=$PATH:/usr/local/git/bin How to Install Emacs26# download source code package wget http://mirrors.ustc.edu.cn/gnu/emacs/emacs-26.1.tar.xz # ready for compiling # . not found: gnutls yum install gnutls gnutls-devel # . tputs was not found yum install ncurses-devel # extract & make & install xz -d emacs-26.1.tar.xz tar -xvf emacs-26.1.tar ./configure --prefix=/usr/local/emacs26 make && make install # set PATH export PATH=$PATH:/usr/local/emacs26/bin ManjaroChinese Input Way# Install fcitx modules # fcitx-im includes all 'Gtk+/Qt' modules # fcitx-configtool is a GUI configtool pacman -S fcitx-im fcitx-configtool Fcitx has a built-in ‘Pingyin‘,and if you want to install ‘sogoupinyin‘: # install sogoupinyin pacman -S fcitx-sogoupinyin # and nano ~/.xprofile Append the following contents to export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export [email?protected]=fcitx Software Source MirrorsSoftware Source,a remote software archives repo,like:
Sort the mirrorlist nano /etc/pacman.d/mirrorlist Move Add archlinuxcn Repo nano /etc/pacman.conf # append the following contents to 'pacman.conf' # TUNA (ipv4,ipv6,http,https) [archlinuxcn] Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch # Save & Exit,and exec sudo pacman -Syy # Install GPG keys of archlinuxcn sudo pacman -S archlinuxcn-keyring # Update & Upgrade sudo pacman -Syyu Chinese Inputing of Emacs# edit .bashrc or .zshrc sudo nano ~/.bashrc # set an alias to start Emacs alias myemacs ='LC_CTYPE="zh_CN.utf8" emacs' # make it effective source ~/.bashrc How to make it effective with Emacs GUI? sudo nano /etc/profile # append the following contents export LC_CTYPE="zh_CN.UTF-8" Restart you PC,and it will be okay. Resize of Org Inline ImageRefer Link In Org Mode,it offers a You can adjust the size of the image via
UbuntuReset Font-family of MintYou need to remove two installed packages,like: sudo apt remove fonts-arphic-ukai fonts-arphic-uming (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |