sudo apt-get install openssh-server openssh-client
apt-get update
apt-get install docker.io
sudo docker run -i -t ubuntu /bin/bash
Which should download the ubuntu image, and then start bash in a container.
uname -a
Linux cb08e20bed23 3.13.0-24-generic
apt-get update
apt-get install nodejs
docker commit 00000000 simulator/nodejs
apt-get install npm
docker commit 00000000 simulator/npm
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
apt-get install -y mongodb-org
/var/lib/mongodb
/var/log/mongodb
/etc/mongod.conf
service mongod start
# export and import images
docker save mynewimage > /tmp/mynewimage.tar
docker load < /tmp/mynewimage.tar
Last active
August 29, 2015 14:09
-
-
Save wolf-mtwo/d2a08170735da52fa27f to your computer and use it in GitHub Desktop.
Easy commands Ubuntu 14
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get install openssh-server openssh-client
ssh localhost
cp -R folder-clone data_block_v0.1
tar -cvzf data_block_v0.1.tar.gz data_block_v0.1
scp data_block_v0.1.tar.gz wolf@0.0.0.0:/wolf
###other size
tar -xvf data_block_v0.1.tar.gz`
```
sudo visudo
wolf ALL=(ALL) NOPASSWD: ALL
// export VISUAL=vim
// crontab -e
// */1 * * * * mongo test /wolf/demo.js >> /wolf/change.log
sudo dpkg-reconfigure tzdata
$ sudo dhclient eth0
$ curl -sSL https://get.docker.com/ubuntu/ | sudo sh
sudo service networking restart
sudo /etc/init.d/network restart
$ ps -ef | grep node
$ sudo netstat -nap | grep 80
$ cd filename
$ cd filename/new/folder
$ cd .. # go back
$ cd # go home
$ cd ~
$ cd / # go root
$ sudo -s # change to root
$ echo "message" | wall
$ sudo ufw disable
$ zip -r zipfile.zip directory #-r aply to folder three
$ sudo apt-get install unzip
$ unzip filename.zip
$ unzip file.zip -d /Dir
$ sudo unzip file.zip -d /rootDir
$ tar cvzf MyImages-14-09-12.tar.gz /home/MyImages
OR
$ tar cvzf MyImages-14-09-12.tgz /home/MyImages
$ tar -xvf public_html-14-09-12.tar
$ tar -xvf public_html-14-09-12.tar -C /home/public_html/videos/
Copy files from server to server
$ scp source_file_name username@destination_host:destination_folder # from local to remote
$ scp demo.tar.gz root@0.0.0.0:~
$ scp username@destination_host:destination_folder . # from remote to local
$ scp username@destination_host:destination_folder source_file_name # to local path
cp -R folder
$ pwd
(que significa "print working directory", y en castellano? imprimir el directorio en el que estoy trabajando )
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment