linux学习 - 基本命令篇

关机重启命令

  • 重启命令
    • reboot
    • shutdown -r now 立刻重启 (root用户使用)
    • shutdown -r 10 过10分钟自动重启 (root用户使用)
  • 关机命令
    • halt 立刻关机
    • poweroff 立刻关机
    • shutdown -h now 立刻关机 (root用户使用)
    • shutdown -h 10 10分钟后自动关机
      • 如果是通过shutdown命令设置关机的话,可以用shutdown -c命令取消

基本操作之修改用户名(Ubuntu)

  1. sudo su转为root用户(这一步是必须的)
  2. gedit /etc/passwd,找到你要修改的那一行(注意不要修改后面的目录)
  3. gedit /etc/shadow,找到代表你的那一行,修改用户名为新用户名
  4. gedit /etc/group,你应该发现你的用户名在很多个组中,全部修改!
  5. 修改完,保存,重启。
  6. 注意:修改的时候要格外小心,不要打错一个字母。
  7. 提示:如果你要修改密码和用户名的话,请先修改密码,重启后,再修改用户名,重启。如果你先修改用户名,再修改密码的话,可能会导致你登录不了Ubuntu。

新建用户

sudo adduser <UserName>

用户组配置文件/etc/group
sudoers配置文件/etc/sudoers

在sudoers配置文件中配置用户使用sudo执行命令不需要输入密码

# <UserName>  <Host>=(<user can be run as >:<group can be run as >) NOPASSWD: <Commands>
<UserName>  ALL=(ALL:ALL) NOPASSWD: ALL

删除用户

sudo deluser --remove-home 

查看系统版本号

  • cat /etc/issue
  • lsb_release -a
  • cat /etc/system-release
    image

查看内核版本

uname -r

查看已安装内核:
find /boot/vmli*

输出:

/boot/vmlinuz
/boot/vmlinuz-5.4.0-96-generic

主机名(hostname)相关

  • 查看主机名: hostname
  • 修改默认主机名: hostname <NEW_HOSTNAME>

查看系统是32位还是64位

  • sudo uname -m

  • sudo uname -a

  • sudo uname -s

  • arch
    image

系统进程信息查看

top # 动态显示进程信息, 类似windows资源管理器

ps # 进程信息快照

ps aux # 列出目前所有的正在内存中的程序

ps -u root # 指定用户的进程信息

[root@izuf6ggrfujyiyg1sz1rrzz vpnserver]# ps -ef | grep ssh
root      3296 30344  0 Jun21 ?        00:00:00 sshd: root@pts/0
root     14340 30344  0 00:56 ?        00:00:00 sshd: root@pts/4
root     16556 14344  0 01:15 pts/4    00:00:00 grep --color=auto ssh
root     30344     1  0 Jan30 ?        00:00:01 /usr/sbin/sshd -D

kill -s 9 [进程的pid] # 杀死指定的进程

ps工具标识进程的5种状态码:

状态码 含义
D 不可中断 uninterruptible sleep (usually IO)
R 运行 runnable (on run queue)
S 中断 sleeping
T 停止 traced or stopped
Z 僵死 a defunct (”zombie”) process
参数:
命令参数 含义
--- ---
a 显示所有进程
-a 显示同一终端下的所有程序
-A 显示所有进程
c 显示进程的真实名称
-N 反向选择
-e 等于“-A”
e 显示环境变量
f 显示程序间的关系
-H 显示树状结构
r 显示当前终端的进程
T 显示当前终端的所有程序
u 指定用户的所有进程
-au 显示较详细的资讯
-aux 显示所有包含其他使用者的行程
-C<命令> 列出指定命令的状况
–lines<行数> 每页显示的行数
–width<字符数> 每页显示的字符数
–help 显示帮助信息
–version 显示版本显示

查看某个端口被占用的情况

# 查看80端口被占用的情况
netstat -lnp|grep 80
tcp6       0      0 :::80                   :::*                    LISTEN      11983/dotnet        
unix  2      [ ACC ]     STREAM     LISTENING     87180246 22677/SCREEN         /var/run/screen/S-root/22677.iodined

# 杀死占用80端口的进程
kill -s 9 11983

查看磁盘分区使用情况

df 命令

~$ df -lg
---
Filesystem      Size  Used Avail Use% Mounted on
udev            2.1G     0  2.1G   0% /dev
tmpfs           422M  6.6M  415M   2% /run
/dev/sda1        39G   13G   25G  34% /
tmpfs           2.1G  352K  2.1G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           2.1G     0  2.1G   0% /sys/fs/cgroup
tmpfs           422M   60K  422M   1% /run/user/1001

fdisk

fdisk 是一款强大的磁盘操作工具,来自util-linux软件包,我们在这里只说他如何查看磁盘分区表及分区结构;参数 -l ,通过-l 参数,能获得机器中所有的硬盘的分区情况.

~$ sudo fdisk -l
--- 
[sudo] password for la: 
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb5aa146c

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 81885183 81883136   39G 83 Linux
/dev/sda2       81887230 83884031  1996802  975M  5 Extended
/dev/sda5       81887232 83884031  1996800  975M 82 Linux swap / Solaris

内存使用情况查看

  1. top
  2. cat /prop/meminfo
    [root@izj6cenzpmyvcziekc9a1lz ~]# cat /proc/meminfo 
    MemTotal:        1014488 kB
    MemFree:           77228 kB
    MemAvailable:     168748 kB
    Buffers:           22856 kB
    Cached:           225852 kB
    SwapCached:            0 kB
    Active:           687780 kB
    Inactive:         173396 kB
    Active(anon):     616572 kB
    Inactive(anon):    35464 kB
    Active(file):      71208 kB
    Inactive(file):   137932 kB
    Unevictable:          16 kB
    Mlocked:              16 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                 0 kB
    Writeback:             0 kB
    AnonPages:        611508 kB
    Mapped:            38012 kB
    Shmem:             51320 kB
    Slab:              51268 kB
    SReclaimable:      20156 kB
    SUnreclaim:        31112 kB
    KernelStack:        3016 kB
    PageTables:         6620 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:      507244 kB
    Committed_AS:    1593752 kB
    VmallocTotal:   34359738367 kB
    VmallocUsed:           0 kB
    VmallocChunk:          0 kB
    HardwareCorrupted:     0 kB
    AnonHugePages:    374784 kB
    ShmemHugePages:        0 kB
    ShmemPmdMapped:        0 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    DirectMap4k:      309120 kB
    DirectMap2M:      739328 kB
    DirectMap1G:           0 kB
    
  3. free -h
[root@izj6cenzpmyvcziekc9a1lz ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           990M        648M         66M         50M        275M        159M
Swap:          2.0G          0B        2.0G

设置交换分区

参考: https://blog.csdn.net/ausboyue/article/details/73433990

创建新的交换分区

# 创建swap交换文件, 执行此命令后, 会执行2g读写操作, 系统会卡一下
dd if=/dev/zero of=/var/swapfile bs=1024 count=2048k

# 对交换文件格式化并转换为swap分区
mkswap /var/swapfile

# 挂载并激活分区
chmod -R 0600 /var/swapfile
swapon /var/swapfile

# 修改 fstab 配置,设置开机自动挂载该分区
vim /etc/fstab
# 文件末尾加入 /var/swapfile   swap  swap  defaults  0  0

删除交换分区

# 停止正在使用swap分区
swapoff /var/swapfile

# 删除swap分区文件
rm -rf /var/swapfile

# 删除或注释掉我们之前在fstab文件里追加的开机自动挂载配置内容 /var/swapfile   swap  swap  defaults  0  0
vim /etc/fstab

日期时间

查看当前时间

date

~$ date
Sat Nov 14 21:12:42 CST 2020

查看当前时区

date -R

~$ date -R
Sat, 14 Nov 2020 21:13:37 +0800

修改日期

将系统日期写入为1996年6月10日

date -s 06/22/96

修改时间

将系统时间设定成下午1点52分0秒

date -s 13:52:00

将当前时间和日期写入BIOS,避免重启后失效

hwclock -w

设置时区

方法1

tzselect, 交互的方式设置时区, 会让你输入索引选择时区

方法2

替换系统时区文件
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

ip配置

配置静态ip

参考: Centos 7 学习之静态IP设置

编辑 ifcfg-eth0 文件 vim /etc/sysconfig/network-scripts/ifcfg-eth0

修改如下内容

BOOTPROTO="static" #dhcp改为static 
ONBOOT="yes" #开机启用本配置
IPADDR="192.168.124.10" #静态IP
GATEWAY="192.168.124.1" #默认网关
NETMASK="255.255.255.0" #子网掩码
DNS1="192.168.124.1" #DNS 配置

重启网络

service network restart或者systemctl restart network

测试是否连接到互联网

[root@localhost ~]# curl -vv https://www.baidu.com
* About to connect() to www.baidu.com port 443 (#0)
*   Trying 180.101.49.11...
* Connected to www.baidu.com (180.101.49.11) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* 	subject: CN=baidu.com,O="Beijing Baidu Netcom Science Technology Co., Ltd",OU=service operation department,L=beijing,ST=beijing,C=CN
* 	start date: Apr 02 07:04:58 2020 GMT
* 	expire date: Jul 26 05:31:02 2021 GMT
* 	common name: baidu.com
* 	issuer: CN=GlobalSign Organization Validation CA - SHA256 - G2,O=GlobalSign nv-sa,C=BE
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: www.baidu.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
< Connection: keep-alive
< Content-Length: 2443
< Content-Type: text/html
< Date: Tue, 01 Dec 2020 18:34:05 GMT
< Etag: "588603eb-98b"
< Last-Modified: Mon, 23 Jan 2017 13:23:55 GMT
< Pragma: no-cache
< Server: bfe/1.0.8.18
< Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/
< 
<!DOCTYPE html>
<!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/bdorz/baidu.min.css><title>百度一下,你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class="bg s_ipt_wr"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus=autofocus></span><span class="bg s_btn_wr"><input type=submit id=su value=百度一下 class="bg s_btn" autofocus></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>新闻</a> <a href=https://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>地图</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>视频</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>贴吧</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&amp;tpl=mn&amp;u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>登录</a> </noscript> <script>document.write('<a href="http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u='+ encodeURIComponent(window.location.href+ (window.location.search === "" ? "?" : "&")+ "bdorz_come=1")+ '" name="tj_login" class="lb">登录</a>');
                </script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">更多产品</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>关于百度</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>&copy;2017&nbsp;Baidu&nbsp;<a href=http://www.baidu.com/duty/>使用百度前必读</a>&nbsp; <a href=http://jianyi.baidu.com/ class=cp-feedback>意见反馈</a>&nbsp;京ICP证030173号&nbsp; <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>
* Connection #0 to host www.baidu.com left intact

代理配置

参考: Linux/CentOS设置全局代理(http)

相关变量如下

environment desc example
http_proxy 为http变量设置代理;默认不填开头以http协议传输 10.0.0.51:8080 user:pass@10.0.0.10:8080 socks4://10.0.0.51:1080 socks5://192.168.1.1:1080
https_proxy 为https变量设置代理; 同上
ftp_proxy 为ftp变量设置代理; 同上
all_proxy 全部变量设置代理,设置了这个时候上面的不用设置 同上
no_proxy 无需代理的主机或域名;可以使用通配符;多个时使用“,”号分隔; .aiezu.com,10...,192.168.., *.local,localhost,127.0.0.1

这些变量可以再下面的文件中进行配置

  • /etc/profile
  • ~/.bashrc
  • ~/.zshrc

写法参考下面这样

export proxy="http://192.168.124.7:10808"
export http_proxy=$proxy
export https_proxy=$proxy
export ftp_proxy=$proxy
export no_proxy="localhost, 127.0.0.1, ::1"

# 或者直接配置all_proxy
export proxy="socks5://192.168.124.7:10808"
export all_proxy=$proxy

测试能否连接谷歌

[root@localhost ~]# curl -vv https://www.google.com
* About to connect() to proxy 192.168.124.7 port 10808 (#0)
*   Trying 192.168.124.7...
* 157
* 240
* 10
* 41
* Connected to 192.168.124.7 (192.168.124.7) port 10808 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* 	subject: CN=www.google.com,O=Google LLC,L=Mountain View,ST=California,C=US
* 	start date: Nov 03 07:39:18 2020 GMT
* 	expire date: Jan 26 07:39:18 2021 GMT
* 	common name: www.google.com
* 	issuer: CN=GTS CA 1O1,O=Google Trust Services,C=US
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: www.google.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Tue, 01 Dec 2020 18:35:45 GMT
< Expires: -1
< Cache-Control: private, max-age=0
< Content-Type: text/html; charset=ISO-8859-1
< P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
< Server: gws
< X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN
< Set-Cookie: 1P_JAR=2020-12-01-18; expires=Thu, 31-Dec-2020 18:35:45 GMT; path=/; domain=.google.com; Secure
< Set-Cookie: NID=204=tJOmHC_YVoY6CQ6wo1gGbJnEGVWWRavziZ3-XVwgxqCKEmjBNwz-9aELalRfS89-crGokDb8zFbW59Plqrym-nIQBmynNA4akJCZMyUuu_4hBUS5hVSTdDMEV6H2ienagJRgHjZqzO2fd0VU_34gjB3SPQFjACE3eQezqTAPcdU; expires=Wed, 02-Jun-2021 18:35:45 GMT; path=/; domain=.google.com; HttpOnly
< Alt-Svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
< Accept-Ranges: none
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< 
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="zh-HK"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/logos/doodles/2020/december-holidays-days-2-30-6753651837108830.3-law.gif" itemprop="image"><meta content="December Holidays" property="twitter:title"><meta content="December Holidays 2020 #GoogleDoodle" property="twitter:description"><meta content="December Holidays 2020 #GoogleDoodle" property="og:description"><meta content="summary_large_image" property="twitter:card"><meta content="@GoogleDoodles" property="twitter:site"><meta content="https://www.google.com/logos/doodles/2020/december-holidays-days-2-30-6753651837108830.2-2xa.gif" property="twitter:image"><meta content="https://www.google.com/logos/doodles/2020/december-holidays-days-2-30-6753651837108830.2-2xa.gif" property="og:image"><meta content="1100" property="og:image:width"><meta content="440" property="og:image:height"><meta content="https://www.google.com/logos/doodles/2020/december-holidays-days-2-30-6753651837108830.2-2xa.gif" property="og:url"><meta content="video.other" property="og:type"><title>Google</title><script nonce="xbSk4LaxqY8QxmMY7y/kqQ==">(function(){window.google={kEI:'AY3GX6ahDuGYr7wP76S58A8',kEXPI:'0,202162,1157247,730,224,5105,206,2414,790,10,1145,81,364,1499,817,383,246,5,1129,225,648,3451,315,3,66,768,217,283,980,3859,7,1133,754,108,1115174,1197708,575,7,328977,13677,4855,32691,16115,28684,9188,8384,4859,1361,9290,3029,2844,1895,12841,4998,7931,5297,2054,920,873,4192,6430,14528,235,4281,1399,1379,919,2277,8,2796,1593,1279,2213,240,289,149,1103,840,518,1521,157,4101,312,1137,2,2063,606,2023,2297,1947,2209,1,112,328,1284,2943,2246,3600,3227,2845,7,12354,4454,642,7876,4929,108,3407,908,2,941,2614,2397,7468,3277,3,346,230,970,865,4624,149,5990,7985,4,1528,2304,224,1012,271,874,405,1860,1816,1114,43,1211,2429,17,446,460,1552,4070,1035,1316,3,3280,1426,69,1321,795,299,200,2811,1753,2658,1213,2690,1,339,518,912,564,464,217,8,429,32,1302,982,1570,139,3094,990,52,3030,253,2,2214,849,744,712,638,667,957,475,2,567,915,2146,1024,327,631,2,359,756,613,55,744,612,3226,1659,319,230,587,11,731,64,601,337,1810,3659,2050,307,146,48,479,512,641,416,847,59,362,415,4,337,22,20,16,241,31,165,362,540,1,1762,6,908,3,164,38,1122,203,1341,657,16,1,336,350,263,570,145,337,1323,50,3,2,2,5,2,2,305,360,1269,256,497,438,518,1790,269,1,201,378,787,3,413,231,1165,80,838,2708,5727518,1873,5998827,2801216,549,333,444,1,2,80,1,900,896,1,9,2,2551,1,748,141,59,736,563,1,4265,1,1,2,1017,9,305,3299,248,595,1,1587,291,145,3,158,23,3,2,5,27,1,6,26,23957983,2716138,17691,8456',kBL:'5Uqh'};google.sn='webhp';google.kHL='zh-HK';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var c;a&&(!a.getAttribute||!(c=a.getAttribute("eid")));)a=a.parentNode;return c||google.kEI};google.getLEI=function(a){for(var c=null;a&&(!a.getAttribute||!(c=a.getAttribute("leid")));)a=a.parentNode;return c};google.ml=function(){return null};google.time=function(){return Date.now()};google.log=function(a,c,b,d,g){if(b=google.logUrl(a,c,b,d,g)){a=new Image;var e=google.lc,f=google.li;e[f]=a;a.onerror=a.onload=a.onabort=function(){delete e[f]};google.vel&&google.vel.lu&&google.vel.lu(b);a.src=b;google.li=f+1}};google.logUrl=function(a,c,b,d,g){var e="",f=google.ls||"";b||-1!=c.search("&ei=")||(e="&ei="+google.getEI(d),-1==c.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));d="";!b&&google.cshid&&-1==c.search("&cshid=")&&"slh"!=a&&(d="&cshid="+google.cshid);b=b||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+c+e+f+"&zx="+google.time()+d;/^http:/i.test(b)&&"https:"==window.location.protocol&&(google.ml(Error("a"),!1,{src:b,glmm:1}),b="");return b};}).call(this);(function(){google.y={};google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);google.f={};(function(){
document.documentElement.addEventListener("submit",function(b){var a;if(a=b.target){var c=a.getAttribute("data-submitfalse");a="1"==c||"q"==c&&!a.elements.q.value?!0:!1}else a=!1;a&&(b.preventDefault(),b.stopPropagation())},!0);document.documentElement.addEventListener("click",function(b){var a;a:{for(a=b.target;a&&a!=document.documentElement;a=a.parentElement)if("A"==a.tagName){a="1"==a.getAttribute("data-nohref");break a}a=!1}a&&b.preventDefault()},!0);}).call(this);
var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#1558d6}em{color:#c5221f;font-style:normal;font-weight:normal}a em{text-decoration:underline}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:#000}a{color:#4b11a8;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#1558d6}a:visited{color:#4b11a8}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#f8f9fa;border:solid 1px;border-color:#dadce0 #70757a #70757a #dadce0;height:30px}.lsbb{display:block}#WqQANb a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#dadce0}.lst:focus{outline:none}</style><script nonce="xbSk4LaxqY8QxmMY7y/kqQ=="></script></head><body bgcolor="#fff"><script nonce="xbSk4LaxqY8QxmMY7y/kqQ==">(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><div id="mngb"><div id=gbar><nobr><b class=gb1>&#25628;&#23563;</b> <a class=gb1 href="https://www.google.com.hk/imghp?hl=zh-TW&tab=wi">&#22294;&#29255;</a> <a class=gb1 href="https://maps.google.com.hk/maps?hl=zh-TW&tab=wl">&#22320;&#22294;</a> <a class=gb1 href="https://play.google.com/?hl=zh-TW&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?gl=HK&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.com/?tab=wn">&#26032;&#32862;</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">&#38642;&#31471;&#30828;&#30879;</a> <a class=gb1 style="text-decoration:none" href="https://www.google.com.hk/intl/zh-TW/about/products?tab=wh"><u>&#26356;&#22810;</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.com.hk/history/optout?hl=zh-TW" class=gb4>&#32178;&#38913;&#35352;&#37636;</a> | <a  href="/preferences?hl=zh-TW" class=gb4>&#35373;&#23450;</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=zh-TW&passive=true&continue=https://www.google.com/&ec=GAZAAQ" class=gb4>&#30331;&#20837;</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div><center><br clear="all" id="lgpd"><div id="lga"><a href="/search?ie=UTF-8&amp;q=December+global+holidays&amp;oi=ddle&amp;ct=173710363&amp;hl=en&amp;sa=X&amp;ved=0ahUKEwjmpcCotq3tAhVhzIsBHW9SDv4QPQgD"><img alt="December Holidays" border="0" height="180" src="/logos/doodles/2020/december-holidays-days-2-30-6753651837108830.3-law.gif" title="December Holidays" width="500" id="hplogo"><br></a><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%">&nbsp;</td><td align="center" nowrap=""><input name="ie" value="ISO-8859-1" type="hidden"><input value="zh-HK" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input class="lst" style="margin:0;padding:5px 8px 0 6px;vertical-align:top;color:#000" autocomplete="off" value="" title="Google &#25628;&#23563;" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google &#25628;&#23563;" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" id="tsuid1" value="&#22909;&#25163;&#27683;" name="btnI" type="submit"><script nonce="xbSk4LaxqY8QxmMY7y/kqQ==">(function(){var id='tsuid1';document.getElementById(id).onclick = function(){if (this.form.q.value){this.checked = 1;if (this.form.iflsig)this.form.iflsig.disabled = false;}
else top.location='/doodles/';};})();</script><input value="AINFCbYAAAAAX8abEVlJkhfzN6B4xTJazvJBnYo57Xoi" name="iflsig" type="hidden"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=zh-HK&amp;authuser=0">&#36914;&#38542;&#25628;&#23563;</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"><script nonce="xbSk4LaxqY8QxmMY7y/kqQ==">(function(){var a,b="1";if(document&&document.getElementById)if("undefined"!=typeof XMLHttpRequest)b="2";else if("undefined"!=typeof ActiveXObject){var c,d,e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(c=0;d=e[c++];)try{new ActiveXObject(d),b="2"}catch(h){}}a=b;if("2"==a&&-1==location.search.indexOf("&gbv=2")){var f=google.gbvu,g=document.getElementById("gbv");g&&(g.value=a);f&&window.setTimeout(function(){location.href=f},0)};}).call(this);</script></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br><div id="gws-output-pages-elements-homepage_additional_languages__als"><style>#gws-output-pages-elements-homepage_additional_languages__als{font-size:small;margin-bottom:24px}#SIvCob{display:inline-block;line-height:28px;}#SIvCob a{padding:0 3px;}.H6sW5{display:inline-block;margin:0 2px;white-space:nowrap}.z4hgWe{display:inline-block;margin:0 2px}</style><div id="SIvCob">Google &#36879;&#36942;&#20197;&#19979;&#35486;&#35328;&#25552;&#20379;&#65306;  <a href="https://www.google.com/setprefs?sig=0_0PnuFWa64e6UZWOiW-xuPUklBU0%3D&amp;hl=zh-CN&amp;source=homepage&amp;sa=X&amp;ved=0ahUKEwjmpcCotq3tAhVhzIsBHW9SDv4Q2ZgBCAU">&#20013;&#25991;(&#31616;&#20307;)</a>    <a href="https://www.google.com/setprefs?sig=0_0PnuFWa64e6UZWOiW-xuPUklBU0%3D&amp;hl=en&amp;source=homepage&amp;sa=X&amp;ved=0ahUKEwjmpcCotq3tAhVhzIsBHW9SDv4Q2ZgBCAY">English</a>  </div></div></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="WqQANb"><a href="/intl/zh-TW/ads/">&#24291;&#21578;&#26381;&#21209;</a><a href="/intl/zh-TW/about.html">&#38364;&#26044; Google</a><a href="https://www.google.com/setprefdomain?prefdom=HK&amp;prev=https://www.google.com.hk/&amp;sig=K_cCoWp_PDBbqjQ1K41X3S2Ab-J2s%3D">Google.com.hk</a></div></div><p style="font-size:8pt;color:#70757a">&copy; 2020 - <a href="/intl/zh-TW/policies/privacy/">&#31169;&#38577;&#27402;&#25919;&#31574;</a> - <a href="/intl/zh-TW/policies/terms/">&#26781;&#27454;</a></p></span></center><script nonce="xbSk4LaxqY8QxmMY7y/kqQ==">(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();(function(){var u='/xjs/_/js/k\x3dxjs.hp.en.0Kg4ELXrwvk.O/m\x3dsb_he,d/am\x3dADxBHA/d\x3d1/rs\x3dACT90oET7xg8oVYu65wMNI4zY_QMVUlniQ';
var c=this||self,e=/^[\w+/_-]+[=]{0,2}$/,f=null,g=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&e.test(a)?a:""},h=function(a){return a};var l;var n=function(a,b){this.a=b===m?a:""},m={};setTimeout(function(){var a=document;var b="SCRIPT";"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());b=a.createElement(b);a=u;if(void 0===l){var d=null;var k=c.trustedTypes;if(k&&k.createPolicy){try{d=k.createPolicy("goog#html",{createHTML:h,createScript:h,createScriptURL:h})}catch(p){c.console&&c.console.error(p.message)}l=d}else l=d}a=(d=l)?d.createScriptURL(a):a;a=new n(a,m);b.src=a instanceof n&&a.constructor===n?a.a:"type_error:TrustedResourceUrl";(a=b.ownerDocument&&b.ownerDocument.defaultView)&&
a!=c?a=g(a.document):(null===f&&(f=g(c.document)),a=f);a&&b.setAttribute("nonce",a);google.timers&&google.timers.load&&google.tick&&google.tick("load","xjsls");document.body.appendChild(b)},0);})();(function(){window.google.xjsu='/xjs/_/js/k\x3dxjs.hp.en.0Kg4ELXrwvk.O/m\x3dsb_he,d/am\x3dADxBHA/d\x3d1/rs\x3dACT90oET7xg8oVYu65wMNI4zY_QMVUlniQ';})();function _DumpException(e){throw e;}
function _F_installCss(c){}
(function(){google.jl={dw:false,em:[],emw:false,lls:'default',pdt:0,snet:true,uwp:true};})();(function(){var pmc='{\x22d\x22:{},\x22sb_he\x22:{\x22agen\x22:true,\x22cgen\x22:true,\x22client\x22:\x22heirloom-hp\x22,\x22dh\x22:true,\x22dhqt\x22:true,\x22ds\x22:\x22\x22,\x22ffql\x22:\x22zh-TW\x22,\x22fl\x22:true,\x22host\x22:\x22google.com\x22,\x22isbh\x22:28,\x22msgs\x22:{\x22cibl\x22:\x22&#28165;&#38500;&#25628;&#23563;\x22,\x22dym\x22:\x22&#24744;&#26159;&#19981;&#26159;&#35201;&#26597;&#65306;\x22,\x22lcky\x22:\x22&#22909;&#25163;&#27683;\x22,\x22lml\x22:\x22&#30637;&#35299;&#35443;&#24773;\x22,\x22oskt\x22:\x22&#36664;&#20837;&#24037;&#20855;\x22,\x22psrc\x22:\x22&#24050;&#24478;&#24744;&#30340;&#12300;\\u003Ca href\x3d\\\x22/history\\\x22\\u003E&#32178;&#38913;&#35352;&#37636;\\u003C/a\\u003E&#12301;&#20013;&#31227;&#38500;&#36889;&#31558;&#25628;&#23563;&#35352;&#37636;\x22,\x22psrl\x22:\x22&#31227;&#38500;\x22,\x22sbit\x22:\x22&#20197;&#22294;&#25628;&#23563;\x22,\x22srch\x22:\x22Google &#25628;&#23563;\x22},\x22nrft\x22:false,\x22ovr\x22:{},\x22pq\x22:\x22\x22,\x22refpd\x22:true,\x22refspre\x22:true,\x22rfs\x22:[],\x22sbas\x22:\x220 3px 8px 0 rgba(0,0,0,0.2),0 0 0 1px r* Connection #0 to host www.google.com left intact
gba(0,0,0,0.08)\x22,\x22sbpl\x22:16,\x22sbpr\x22:16,\x22scd\x22:10,\x22stok\x22:\x22kXrvkhkNeYVOhR1HII1n_RkjIDU\x22,\x22uhde\x22:false}}';google.pmc=JSON.parse(pmc);})();</script>
posted @ 2019-10-12 12:23  Laggage  阅读(1030)  评论(0编辑  收藏  举报