ubuntu修改主机名 主机名在/etc/hostname文件中了,只在打开这个文件进行修改,重启计算机即可. 一.查看主机名 $ hostname #查看主机名 cdyemail 二.通过指令修改主机名 $ hostname server #修改主机名,但提示我必须用root权限 hostname: you must be root to change the host name $ sudo hostname server #修改主机名 $ hostname #查看主机名
code {margin: 0;padding: 0;font-size: 100%;word-break: normal;background: transparent;border: 0;}ol {list-style-type: decimal;}ol ol, ul ol {list-style-type: lower-latin;}ol ol ol, ul ol ol, ul ul ol, ol ul ol {list-style-type: lower-roman;}table {bo
#!/bin/sh function scandir(){ local cur_dir parent_dir workdir workdir=$ cd ${workdir} if [ ${workdir} = "/" ] then cur_dir="" else cur_dir=$(pwd) fi for dirlist in $(ls ${cur_dir}) do if test -d ${dirlist};then cd ${dirlist} scandir $