install a new linux operating system and the repeatable git bash (what I do after reinstall the sys)


find the fastest Server in SoftWare & Updates of the System Setting


1.install a git in my PC

$ sudo apt-get install git
$ git config --global user.name mazicwong
$ git config --global user.email mazicwong@gmail.com
$ mkdir mygit
$ cd mygit 
//$ git init

2.verify my github account :    https/ssh(what I chose)

http://www.runoob.com/w3cnote/git-guide.html

$ ssh-keygen -t rsa -C mazicwong@gmail.com  //配置本地ssh key
$ cd ~/.ssh
$ vi id_rsa.pub
$ ssh -T git@github.com

一路回车不设置密码,在id_rsa.pub中复制下内容,放到github上的add ssh key中

//$ git clone git@github.mazicwong/acmArchive.git
$ git clone git@github.com:mazicwong/acmArchive.git
$ touch README
$ git add README
$ git commit -m 'a new file'

### 新建一个仓库,然后绑定已有的远程仓库,并进行同步的命令

$ mkdir mm
$ cd mm
$ git init
$ touch readME
$ git add readME
$ git commit -m 'this is a new message'
$ git remote add origin https://github.com/mazicwong/test_linux.git  //本地仓库与github仓库关联
//$ git push origiin master //这里会失败,要先同步下远程
$ git pull origin master  //'fetch' & 'merge' the remote change

上面那样其实也可以直接克隆一个远程仓库下来,然后进行修改

$ git clone https://github.com/mazicwong/linux_test.git  


3.use "git add,git commit -m "what I want to say",git push"

combined with "git log , git status ,git diff "


4.have a document connecting with windows , mainly for the purpose of exchanging things 

set up a document in the options->shareFolders

(you can also use sshSecureShellClient & putty)

 (download the putty : click here)


5.VMware Tools (only in virtual machine)

load the VMware Tools ,

then Extract to the desktop & extract the tar to the desktop,

and execute the following command in "sudo su" command

# cd vmware-tools-distrib
# sudo ./vmware-install.pl
and then restart it


6.install the google chrome

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo dpkg -i google-chrome*
$ sudo apt-get -f install


7.prepare for a github.io

装完nodejs然后记得把node链接过去

安装npm包管理工具,由于不稳定,所以绑定淘宝镜像,用cnpm

两种配置方法:

方法1:(以前可以用,最近一次安装提示看nodejs版本过低,可能也是因为apt源的问题,建议改用方法二)

$ sudo apt-get install nodejs     // nodejs --version
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
$ sudo apt-get install npm
$ npm install -g cnpm --registry=https://registry.npm.taobao.org //绑定淘宝镜像,以后npm改成用cnpm
$ sudo cnpm install hexo-cli -g
hexo init blog
cd blog
sudo c1npm install
sudo hexo server   //本地服务器

(Note1:  安装完后执行 $ sudo cnpm install npm -g 来升级npm)


方法2:(2018/3/13 测试可行)

由于上面用apt可能会提示nodejs版本太低,所以直接到官网下载来安装https://nodejs.org/en/

具体方法:到官网下载包后,把这个文件放到/opt/下,然后建立硬链接

$ sudo ln -s /opt/node-v8.10.0-linux-x64/bin/node  /usr/local/bin/node
$ sudo ln -s /opt/node-v8.10.0-linux-x64/bin/npm  /usr/local/bin/npm

接下来运行 node -v 和 npm -v看下是否成功

这样就不用再下载npm了,而且官网的包只有11M,去github clone下来的是完整版,350M,没必要

接下来安装hexo

$ npm install hexo-cli -g
$ sudo ln -s /opt/node-v8.10.0-linux-x64/bin/hexo  /usr/local/bin/hexo
$ sudo ln -s /opt/node-v8.10.0-linux-x64/bin/npx  /usr/local/bin/npx

推送到github

npm install hexo-deployer-git --save

步骤

hexo new "name"   //新建文章
hexo new page "name"  //新建页面
sudo hexo generate   //将.md解析成html
sudo hexo deploy


以后每次的步骤

hexo clean
hexo generate
hexo deploy

修改主题

cd themes
git clone https://github.com/wuchong/jacman.git ./jacman
cd ./jacman
git pull
然后修改_config.yml中的theme


注意的地方

1) 安装npm出问题了,直接装的哪个用不了,改成淘宝镜像cnpm  (修改时记得加sudo)
https://npm.taobao.org/
http://blog.csdn.net/quuqu/article/details/64121812
2)试了很久的地方,在  sudo hexo d 的时候,一直显示错误
解决方法:把 _config.yml 中deploy下面的repo改为http的,不要用ssh,也注意不能用成https
     然后再把该路径下的 .deploy_git 删除,再sudo hexo clean,接下来重新 sudo hexo d 就可以啦。。试了好久啊 

8. two os

in linux : sudo update-grub

两个时间

http://blog.csdn.net/muzilinxi90/article/details/51470191


9. vim

how to use visual markdown 

sudo npm -g install instant-markdown-d
~/.vimrc中添加
Plugin 'suan/vim-instant-markdown'

vim中执行

:PluginInstall


10.sogou pinyin

Download the deb in the "https://pinyin.sogou.com/linux/"

setting the configure from "ibus" to "fcitx"; (At the top-right corner, System Setting -> Language Support)

Note!: if there occurs some error to the sogou, just try to remove `~/.config.Sogou*`, which is useful in my Ubuntu.

But, there is another unsolved problem, that is in my deepin, the sogouPinYin can just use in file system but could not used in neither google chrome nor terminal !


11. try the LaTex

$ sudo apt-get intsall texlive   (the env of LaTex)
$ sudo apt-get install texmaker (the editor of LaTex)
$ texmaker

First install the basic-envirment and the editor, then run the editor with " $  texmaker" in the terminal

And write down the grammar in the editor



 
 
 
 
 
 

                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值