<em id="0a85b"><option id="0a85b"></option></em>

<abbr id="0a85b"></abbr>

      <nobr id="0a85b"></nobr>
        <tr id="0a85b"></tr>
        9久久伊人精品综合,亚洲一区精品视频在线,成 人免费va视频,国产一区二区三区黄网,99国产精品永久免费视频,亚洲毛片多多影院,精品久久久无码人妻中文字幕,无码国产欧美一区二区三区不卡
        學習啦 > 學習電腦 > 操作系統 > Linux教程 >

        linux的sudo命令實例分析介紹

        時間: 加城1195 分享

          Linux sudo命令以系統管理者的身份執行指令,也就是說,經由 sudo 所執行的指令就好像是 root 親自執行。具體怎么使用呢。下面由學習啦小編為大家整理了linux的sudo命令的相關知識,希望大家喜歡!

          linux的sudo命令實例

          sudo命令使用

          $ sudo ls

          [sudo] password for hnlinux:

          hnlinux is not in the sudoers file. This incident will be reported.

          指定用戶執行命令

          # sudo -u userb ls -l

          顯示sudo設置

          $ sudo -L //顯示sudo設置

          Available options in a sudoers ``Defaults'' line:

          syslog: Syslog facility if syslog is being used for logging

          syslog_goodpri: Syslog priority to use when user authenticates successfully

          syslog_badpri: Syslog priority to use when user authenticates unsuccessfully

          long_otp_prompt: Put OTP prompt on its own line

          ignore_dot: Ignore '.' in $PATH

          mail_always: Always send mail when sudo is run

          mail_badpass: Send mail if user authentication fails

          mail_no_user: Send mail if the user is not in sudoers

          mail_no_host: Send mail if the user is not in sudoers for this host

          mail_no_perms: Send mail if the user is not allowed to run a command

          tty_tickets: Use a separate timestamp for each user/tty combo

          lecture: Lecture user the first time they run sudo

          lecture_file: File containing the sudo lecture

          authenticate: Require users to authenticate by default

          root_sudo: Root may run sudo

          log_host: Log the hostname in the (non-syslog) log file

          log_year: Log the year in the (non-syslog) log file

          shell_noargs: If sudo is invoked with no arguments, start a shell

          set_home: Set $HOME to the target user when starting a shell with -s

          always_set_home: Always set $HOME to the target user's home directory

          path_info: Allow some information gathering to give useful error messages

          fqdn: Require fully-qualified hostnames in the sudoers file

          insults: Insult the user when they enter an incorrect password

          requiretty: Only allow the user to run sudo if they have a tty

          env_editor: Visudo will honor the EDITOR environment variable

          rootpw: Prompt for root's password, not the users's

          runaspw: Prompt for the runas_default user's password, not the users's

          targetpw: Prompt for the target user's password, not the users's

          use_loginclass: Apply defaults in the target user's login class if there is one

          set_logname: Set the LOGNAME and USER environment variables

          stay_setuid: Only set the effective uid to the target user, not the real uid

          preserve_groups: Don't initialize the group vector to that of the target user

          loglinelen: Length at which to wrap log file lines (0 for no wrap)

          timestamp_timeout: Authentication timestamp timeout

          passwd_timeout: Password prompt timeout

          passwd_tries: Number of tries to enter a password

          umask: Umask to use or 0777 to use user's

          logfile: Path to log file

          mailerpath: Path to mail program

          mailerflags: Flags for mail program

          mailto: Address to send mail to

          mailfrom: Address to send mail from

          mailsub: Subject line for mail messages

          badpass_message: Incorrect password message

          timestampdir: Path to authentication timestamp dir

          timestampowner: Owner of the authentication timestamp dir

          exempt_group: Users in this group are exempt from password and PATH requirements

          passprompt: Default password prompt

          passprompt_override: If set, passprompt will override system prompt in all cases.

          runas_default: Default user to run commands as

          secure_path: Value to override user's $PATH with

          editor: Path to the editor for use by visudo

          listpw: When to require a password for 'list' pseudocommand

          verifypw: When to require a password for 'verify' pseudocommand

          noexec: Preload the dummy exec functions contained in 'noexec_file'

          noexec_file: File containing dummy exec functions

          ignore_local_sudoers: If LDAP directory is up, do we ignore local sudoers file

          closefrom: File descriptors >= %d will be closed before executing a command

          closefrom_override: If set, users may override the value of `closefrom' with the -C option

          setenv: Allow users to set arbitrary environment variables

          env_reset: Reset the environment to a default set of variables

          env_check: Environment variables to check for sanity

          env_delete: Environment variables to remove

          env_keep: Environment variables to preserve

          role: SELinux role to use in the new security context

          type: SELinux type to use in the new security context

          askpass: Path to the askpass helper program

          env_file: Path to the sudo-specific environment file

          sudoers_locale: Locale to use while parsing sudoers

          visiblepw: Allow sudo to prompt for a password even if it would be visisble

          pwfeedback: Provide visual feedback at the password prompt when there is user input

          fast_glob: Use faster globbing that is less accurate but does not access the filesystem

          umask_override: The umask specified in sudoers will override the user's, even if it is more permissive

          以root權限執行上一條命令

          $ sudo !!

          以特定用戶身份進行編輯文本

          $ sudo -u uggc vi ~www/index.html

          //以 uggc 用戶身份編輯 home 目錄下www目錄中的 index.html 文件

          列出目前的權限

          sudo -l

          列出 sudo 的版本資訊

          sudo -V

          相關閱讀:Linux常用基本命令

          文件名--test

          mkdir test 創建一個文件夾

          mkdir test/test1/test2 -p 在創建test1時候,繼續創建test2目錄,一起創建

          mv test test1 修改文件名稱

          mv test /位置 復制文件到指定位置

          cat test 查看文件內容

          unzip 解壓包 解壓當前文件

          unzip 解壓包 -d /位置 解壓壓縮包到指定位置

          rm test 刪除一個文件

          rm -rf test 刪除一個帶文件或者文件夾的 文件目錄

          cp test test1 復制一個文件

          cp -r test test1 復制一個文件夾(包含文件夾下的文件)

          vi 文件名 修改文件內容

          按i鍵,下方出現insert,開始編輯內容

          編輯完內容,按esc,退出編輯模式

          :wq 保存退出

          :q! 不保存文件退出

          啟動報錯,給權限

          chmod 777 ./startup.sh

          chmod -R 777 catalina.sh

          重啟nginx: 進入到nginx的sbin目錄,重啟: ./nginx -s reload(也意指在不關機的情況下,刷新配置文件)

          啟動nginx: 進入到nginx的sbin目錄,命令./nginx 開啟服務

          關閉nginx: 進入到nginx的sbin目錄,命令./nginx -s stop(./nginx -s quit) 關閉服務

        3996458 主站蜘蛛池模板: 奶头好大揉着好爽视频| 91麻豆国产精品91久久久| 久久99精品中文字幕| 午夜精品福利亚洲国产| 国产亚洲一二三区精品| 亚洲区一区二区三区精品| 中文字幕在线永久免费视频| √天堂资源在线中文8在线最新版| 中文字幕国产精品综合| 免费无码中文字幕A级毛片| 亚洲人成无码网站18禁| 午夜福利看片在线观看| 人人妻人人做人人爽| 亚洲av无一区二区三区| 91热国内精品永久免费观看 | 日本亚洲一区二区精品| 国产精品一区二区AV| 中文字幕日韩精品国产| 国产精品一区二区三区蜜臀| 污污网站18禁在线永久免费观看 | 国产人妻人伦精品无码麻豆| 日本中文字幕不卡在线一区二区| 亚洲精品人成网线在线| 精品人妻av中文字幕乱| 换着玩人妻中文字幕| 宅宅少妇无码| 日本中文字幕一区二区三| 欧美在线观看www| 久久久久四虎精品免费入口| 国内精品免费久久久久电影院97| 欧美自拍另类欧美综合图区| 亚洲国产欧美一区二区好看电影 | 性饥渴少妇av无码毛片| 亚洲成人av免费一区| 老熟女乱了伦| 成人无码午夜在线观看| 秋霞电影网久久久精品| av日韩在线一区二区三区| 99久久婷婷国产综合精品| 亚洲日本精品一区二区| 丁香五月亚洲综合在线国内自拍 |