play command line

vagrant@vagrant-ubuntu-trusty-64:/$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

All packages list below

vagrant@vagrant-ubuntu-trusty-64:/$ cat /etc/apt/sources.list

Update software

vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get update

install

vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get install finger

Apache HTTP Server apache2
PostgreSQL postgresql
Memcache memcached

type finger

vagrant@vagrant-ubuntu-trusty-64:~$ finger
Login     Name       Tty      Idle  Login Time   Office     Office Phone
vagrant              pts/0          Jan 18 12:14 (192.168.53.1)
vagrant@vagrant-ubuntu-trusty-64:~$ cat /etc/passwd

add user

vagrant@vagrant-ubuntu-trusty-64:~$ sudo adduser student
Adding user `student' ...
Adding new group `student' (1002) ...
Adding new user `student' (1002) with group `student' ...
Creating home directory `/home/student' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
Sorry, passwords do not match
passwd: Authentication token manipulation error
passwd: password unchanged
Try again? [y/N] y
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for student
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n]

sudo file

student@vagrant-ubuntu-trusty-64:~$ sudo cat /etc/passwd
[sudo] password for student:
student is not in the sudoers file.  This incident will be reported.

command line

vagrant@vagrant-ubuntu-trusty-64:~$ pwd
/home/vagrant

show hidden file

vagrant@vagrant-ubuntu-trusty-64:~$ ls -a
.  ..  .bash_logout  .bashrc  .cache  .profile  .ssh

ls -al long command

vagrant@vagrant-ubuntu-trusty-64:~$ ls -al
total 28
drwxr-xr-x 4 vagrant vagrant 4096 Jan 18 12:09 .
drwxr-xr-x 4 root    root    4096 Jan 18 12:08 ..
-rw-r--r-- 1 vagrant vagrant  220 Apr  9  2014 .bash_logout
-rw-r--r-- 1 vagrant vagrant 3637 Apr  9  2014 .bashrc
drwx------ 2 vagrant vagrant 4096 Jan 18 12:09 .cache
-rw-r--r-- 1 vagrant vagrant  675 Apr  9  2014 .profile
drwx------ 2 vagrant vagrant 4096 Jan 18 12:09 .ssh

All file in root directory

Linux

Ubuntu:Ease of use on servers, desktops, laptops
https://www.ubuntu.com/

CentOS
https://www.centos.org/

RedHat:Large enterprise / corporate customers
https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux

CoreOS
https://coreos.com/

getting started ubuntu
>vagrant init ubuntu/trusty64

then, start vagrant up command.
here comes


Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-105-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed Jan 18 12:13:23 UTC 2017

  System load:  0.09              Processes:           75
  Usage of /:   3.5% of 39.34GB   Users logged in:     0
  Memory usage: 26%               IP address for eth0: 10.0.2.15
  Swap usage:   0%                IP address for eth1: 192.168.53.10

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

crontab

crontab:設定した時間になったら定期的にコマンドを実行

crontab -e //クロン編集

MAILTO=”” //結果をメールで送信
0 9 * * * /home/dir/taisho.sh //時間指定と起動するシェルの指定

時間の設定例
分 時 日 月 曜日 説明
0 * * * * 毎時0分にソース実行
0,45 * * * * 毎時0分と45分にソースが実行
0 3 15 * * 毎月15日の3時にソースが実行

linux
ファイル名.sh
#! /bin/sh
command1
command2
command3

1. cronが起動しているかの確認

[vagrant@localhost rss6]$ /etc/rc.d/init.d/crond status
crond (pid  2624) を実行中...

2.cronに既にバッチ処理が設定されているか確認

[vagrant@localhost rss6]$ crontab -l
no crontab for vagrant

3. cronの設定ファイルを確認

[vagrant@localhost rss6]$ less /etc/crontab

4.バッチの設定

crontab -e
 0 0 * * * /bin/bash /home/xxx/cron_all.sh > /dev/null 2>&1