最近在跟ucb的cs162,上来配置vagrant就挺头大的
https://cs162.eecs.berkeley.edu/static/hw/hw0.pdf
我家里使用ubuntu 16.04,公司电脑是win10 ,先说ubuntu
virtualbox
vagrantup
sudo dpkg -i xxxxxx #替换为文件名
vagrant up
会等很久
$ mkdir cs162-vm
$ cd cs162-vm
$ vagrant init cs162/spring2016 // 这里请替换为最新的学期
$ vagrant up
$ vagrant ssh
安装smbclient
和cifs-utils
$ sudo apt-get install smbclient
$ sudo apt-get install cifs-utils
$ sudo mount -t cifs -o username=vagrant,password=vagrant //192.168.162.162/vagrant/code /home/cs162-vm/code
留坑
Your first assignment is going to be to modify wc.c, so that it implements word count according to the specification of “man wc”, except that it does not need to support any flags and only needs to support a single input file, (or STDIN if none is specified).
Beware that wc in OS X behaves differently from wc in Ubuntu.
修改wc.c,根据“man wc”里面的要求实现字统计,不需要接受参数,只需要接受文件名(如果没有参数则默认取STDIN)