The $MAIL variable specifies which mailbox you want Bash to poll for new mail. You generally want to set this to your inbox. I use procmail, so I have many mail folders. My inbox (where mail that's actually addressed to me gets sent) is /home/blackmad/Mail/inbox, so when I get new e-mail there, Bash tells me: “You have mail in /home/blackmad/Mail/inbox.”
The PATH variable determines where, and in what order, Bash will look for executables. Each directory is separated by a colon (:). Bash interprets your path from right to left. Let's say your PATH is set to /usr/bin:/bin/:/sbin/:/sbin/. When you enter a command, Bash will look for it in its internal shell functions first, then /usr/bin, then /bin and so on, until it either finds the command or gets to the end of your PATH. Often you may simply want to append or prefix your current PATH; you can do this by specifying
PATH="/prev/path:$PATH:/next/path" export PATHIn the first example, Bash will look through /next/path and /next_next/path after it finishes with your current PATH. In the second example, Bash will first look in /prev/path. You may want to prefix your PATH with /usr/local/bin, since that is where hand-compiled programs are usually located, and these are generally more recent then those that came with your distribution. You may also want to prefix ~/bin and have a bin directory in your home directory where you can put customized versions of programs and scripts (useful if you don't have root on the box).
Since Bash just runs through your .bashrc file and executes everything in it, you can toss in programs you want to run each time you log in. At the end of my .bashrc file, I have the following:
fortune mesg y users
So whenever I log in, fortune greets me with a bit of wisdom, messages are turned on, and I find out who's logged in to the systems.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Devuan Beta Release
- May 2016 Issue of Linux Journal
- EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager
- The US Government and Open-Source Software
- The Humble Hacker?
- BitTorrent Inc.'s Sync
- Open-Source Project Secretly Funded by CIA
- The Death of RoboVM
- New Container Image Standard Promises More Portable Apps
- AdaCore's SPARK Pro
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide