See more articles about "Unix "

Adviser to Unix Ambiance Variables



 09 February 17:12   

    An ambiance capricious is a ambience commonly affiliated or declared if a carapace is started. You can use shells to set variables; the syntax varies but Absolute shells use:

     $ VARNAME=new value

     $ consign VARNAME

     or

     $ consign VARNAME=new value

    Each program started from that carapace will accept VARNAME set to new value. The names of ambiance variables are case-sensitive; by assemblage they are uppercase.

    A carapace capricious is like an ambiance variable, except that it is not exported to new programs started from that shell. (You could consign it, but commonly you just address a carapace initialisation Software to set it in anniversary shell.)

    


    The editor program alleged by sudoedit, vipw, and additional such programs if you acquaint them to adapt a file.

    Examples:

     EDITOR=vi

     EDITOR=emacs

    The home agenda of the user. Alotof programs use this carapace capricious to acquisition your home, appropriately you can set this capricious to override the ambience in /etc/passwd for your home directory. This way, you can alpha programs that put dotfiles or additional files in a altered agenda than your accepted home directory.

    In alotof shells, ~ refers to your home directory. In Absolute shell, ~tux consistently refers to the home agenda of user tux as defined in /etc/passwd, while ~ (without a username afterwards it) consistently refers to the amount of HOME, even if it differs from your home agenda in /etc/passwd.

    The name of the user. This is an simple way for a user to get own username. However, programs haveto not assurance this capricious because it can be set to an approximate value.

    Both LOGNAME and USER should be set to the username.

    Examples:

     LOGNAME=tux

     LOGNAME=puffy

    The area of admission bounded email. If mail or addition bounded email clairvoyant inherits this ambiance variable, it uses this capricious to acquisition the inbox.

    Some users do not accept email at their bounded Unix box, but instead use the Internet to admission their mail server, in which case the MAIL ambiance capricious is irrelevant.

    Many users do not accept MAIL set, in which case the email clairvoyant uses the absence setting. The absence amount for user tux would be /var/mail/tux, which is area some systems bear mail.

    :This is a carapace variable, not commonly exported as an ambiance variable.

    The abundance for which back-bite checks and alerts you for new bounded email.

    The pager alleged by man and additional such programs if you acquaint them to appearance a file.

    Examples:

     PAGER=less

     PAGER=more

    A amplitude or colon afar account of directories in which the carapace searches for executables if a command is run after an complete path. For archetype ls doesnt accept an complete path, but /bin/ls does).

    Some systems set Aisle using the arrangement carapace initialistation files, such as /etc/profile for Absolute shells. Some systems set Aisle afore this as allotment of the login procedure, for archetype in /etc/login.conf for OpenBSD systems. For example, a Linux box could set the Aisle at login, then add /usr/X11R6/bin to the aisle using /etc/profile, then add /home/ambler/bin to the aisle using ~/.bash_profile.

    The arrangement cossack scripts aswell set PATH. On some Linux boxes, the first command to set the aisle would assume to be in /etc/rc.d/rc.sysinit, which is one of the carapace scripts invoked by the init action (inittab).

    Examples:

     PATH=/bin:/sbin:/usr/bin:/usr/sbin:/home/puffy/bin

    If this Aisle is set and you blazon the carapace command

     $ uname -r

    then the carapace searches for the uname executable program. First it searches in /bin, then /sbin, then /usr/bin. If /bin/uname is an executable (which it should be), then the carapace stops analytic and runs it. If /home/puffy/bin/uname aswell is executable, it is not run, because the seek never accomplished that directory.

    :This is a carapace variable, not commonly exported as an ambiance variable.

    The back-bite and accessible area ksh shells use this as the alert string.

    Things that can be put in the alert cord cover h (hostname), u (username), w (absolute pathname of alive directory), W (name of alive agenda w/o path), d (date), (time).

    On some Red Hat boxes, the primary alert cord is set in the /etc/bashrc file. The alert is aswell set in /etc/profile, but the ambience in bashrc seems to yield precedence. A ~/.bashrc book runs /etc/bashrc, which sets the prompt. Because every instance of back-bite runs ~/.bashrc, the alert aswell appears in X sessions started from a affectation administrator such as xdm.

    On some Slackware boxes, the command band alert is set in /etc/profile. The xterm and rxvt prompts are different. The alert is not set for X sessions, but it would be if you address a ~/.bashrc to do that. Prompts are carapace variables set from carapace initialisation scripts. They are not xterm settings set by X assets such as /usr/X11R6/lib/X11/app-defaults/XTerm.

    :This is a carapace variable, not commonly exported as an ambiance variable.

    The back-bite and accessible area ksh shells use this as a accessory alert string.

    This capricious should accept the aforementioned ambience and purpose as .

    


 


 shell, variable, directory, environment, prompt, bashrc, shells, programs, variables, profile, normally, email, setting, value, username, uname, local, command, systems, examples, started, varname, string, exported, scripts, login, executable, xterm, boxes, refers, editor, program, export, bourne, passwd, logname, absolute, searches, pager, example, , environment variable, home directory, shell variable, etc profile, prompt string, variable the, path using, normally exported, boxes the, local email, shells use, started from, etc passwd, environment variables, variable not, started from that, unix environment variables,

Share Adviser to Unix Ambiance Variables:
Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

Adviser to Unix Explanations bc
bc is an arbitrary precision calculator language. The arbitrary precision agency that numbers can accommodate absolute digits (limited by memory); alotof additional languages absolute numbers to eight bytes at most. For addition, subtraction, and multiplication, there is absolute precision. Analysis

UNIX Accretion Aegis Addition
UNIX is a computer operating arrangement that was first developed during the 1960s and 1970s at AT&T Alarm Labs. It was originally conceived as an bookish operating system, decidedly at the university level, and appropriately aegis was not a top antecedence of the design. Back then, however, UNI

UNIX Accretion Aegis Attempt and behavior
Appropriate topics: education, accident administration and enforcement, government aegis levels (C2, &c.) Computing aegis as it applies to UNIX is usually taken to beggarly aegis of a UNIX based accretion arrangement adjoin crooked admission to advice or casework on that system, including

UNIX Accretion Aegis Admission approval
In adjustment to affix to a UNIX based arrangement and accomplish activities, a user haveto accept an account. This annual haveto accept a different after identifier, which is associated with the annual name, or username. The annual aswell has a password, which is cord accepted to the user by wh

UNIX Accretion Aegis UNIX filesystem
Appropriate topics: aggregate managers, book systems, files, directories, ls, find, chown, chgrp, chmod, umask, setuid, setgid, accessory files, ACLs. Most of the data acclimated by a computer is stored on Deejay storage. These are concrete accessories with a about top admission latency,

UNIX Accretion Aegis Accepting accounts
Appropriate topics: carapace environment, countersign aging, countersign strength, dot files, belted shells, abeyant accounts, defended terminals and basis access. The users of a Unix arrangement are alotof acceptable not about as abreast about the aegis aspects of their arrangement as ar

UNIX Accretion Aegis Limited admission
Appropriate topics: modems, ftp, rlogin, ssh, UUCP, NFS, Samba, and Apache. This command is acclimated to authorize a affiliation with addition host that can be accessed via the network, and acquaint with it using the TELNET protocol. About codetelnet/code is acclimated to affix to a

UNIX Accretion Aegis Log files and auditing
Appropriate topics: syslog, lpds log, mail log, install, Audit, and IDS. Log files are generated by arrangement processes to almanac activities for consecutive analysis. They can be advantageous accoutrement for troubleshooting arrangement problems and aswell to analysis for inappropriate

UNIX Accretion Aegis Concrete aegis
Appropriate topics: server room, media accumulator and arrangement connections.The concrete aegis of your accretion basement is at atomic as important as the measures that are activated at the software level. Crooked individuals accepting admission to a server allowance can ambush arrangement tr

UNIX Accretion Aegis Data aegis
Appropriate topics: backups to media, recovery, encryption and adversity recovery.Backup is actual capital in an ambiance area your data is precious, and that to a subset of data for about any computer user, if planning for a advancement system, there are some questions you charge to answer: