当前位置: ManBetXapp > 百科 > 科技 >正文

linux setup命令详解

人气:102 ℃ /2022-11-27 05:30:25

Linux系统下setup命令是什么呢?下面是setup命令的具体介绍:

1、setup命令简介:

setup命令设置公用程序,是一个启动图形设置系统的命令。可以用来配置X,打印设置,时区设置,系统服务,网络配置,配置,防火墙配置,验证配置,鼠标配置。

2、语法:

setup

3、在setup中可设置7类的选项:

登陆认证方式

键盘组态设置

鼠标组态设置

开机时所要启动的系统服务

声卡组态设置

时区设置

X Windows组态设置

4、Linux setup 安装命令:

安装setup:

yum -y install setup

安装setuptool:

yum -y install setuptool

系统服务管理:

yum -y install ntsysv

防火墙设置、网络设置:

yum -y install iptables

防火墙设置:

yum -y install system-config-securitylevel-tui

网络设置:

yum -y install system-config-network-tui

以上就是小编今天的分享了,希望可以帮助到大家。

linux 下set指令

linux shell set 参数说明

背景我们经常见到很多设立了脚本 打头会写如下set -e或者set -ex或者set -eux这是什么意思呢?

具体解释一下Linux set命令用于设置shell。set指令能设置所使用shell的执行方式,可依照不同的需求来做设置。set所有的参数说明

set: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...] Set or unset values of shell options and positional parameters. Change the value of shell attributes and positional parameters, or display the names and values of shell variables. Options: -a Mark variables which are modified or created for export. -b Notify of job termination immediately. -e Exit immediately if a command exits with a non-zero status. -f Disable file name generation (globbing). -h Remember the location of commands as they are looked up. -k All assignment arguments are placed in the environment for a command, not just those that precede the command name. -m Job control is enabled. -n Read commands but do not execute them. -o option-name Set the variable corresponding to option-name: allexport same as -a braceexpand same as -B emacs use an emacs-style line editing interface errexit same as -e errtrace same as -E functrace same as -T hashall same as -h histexpand same as -H history enable command history ignoreeof the shell will not exit upon reading EOF interactive-comments allow comments to appear in interactive commands keyword same as -k monitor same as -m noclobber same as -C noexec same as -n noglob same as -f nolog currently accepted but ignored notify same as -b nounset same as -u onecmd same as -t physical same as -P pipefail the return value of a pipeline is the status of the last command to exit with a non-zero status, or zero if no command exited with a non-zero status posix change the behavior of bash where the default operation differs from the Posix standard to match the standard privileged same as -p verbose same as -v vi use a vi-style line editing interface xtrace same as -x -p Turned on whenever the real and effective user ids do not match. Disables processing of the $ENV file and importing of shell functions. Turning this option off causes the effective uid and gid to be set to the real uid and gid. -t Exit after reading and executing one command. -u Treat unset variables as an error when substituting. -v Print shell input lines as they are read. -x Print commands and their arguments as they are executed. -B the shell will perform brace expansion -C If set, disallow existing regular files to be overwritten by redirection of output. -E If set, the ERR trap is inherited by shell functions. -H Enable ! style history substitution. This flag is on by default when the shell is interactive. -P If set, do not follow symbolic links when executing commands such as cd which change the current directory. -T If set, the DEBUG trap is inherited by shell functions. -- Assign any remaining arguments to the positional parameters. If there are no remaining arguments, the positional parameters are unset. - Assign any remaining arguments to the positional parameters. The -x and -v options are turned off. Using rather than - causes these flags to be turned off. The flags can also be used upon invocation of the shell. The current set of flags may be found in $-. The remaining n ARGs are positional parameters and are assigned, in order, to $1, $2, .. $n. If no ARGs are given, all shell variables are printed. Exit Status: Returns success unless an invalid option is given.

set -eux 也就是 以调试的方式执行shell ,只识别定义过的变量,同时脚本传回值非0 直接结束shell

搜索更多有关“ linux setup命令详解”的信息 [百度搜索] [SoGou搜索] [头条搜索] [360搜索]
CopyRight © 2008-2024 ManBetXappAll Rights Reserved. 手机版