updated readme

This commit is contained in:
Asif Bacchus 2019-01-09 04:17:35 -07:00
parent a19f626e2b
commit 9332ec97ae

113
README.md
View File

@ -6,85 +6,72 @@ something else like a webserver, git-server, cloud platform, programming
workstation, etc. Therefore, only a few core files applicable to nearly every workstation, etc. Therefore, only a few core files applicable to nearly every
conceivable installation are included here. conceivable installation are included here.
This archive and included script are meant to supplement my article on setting
up a Debian base-system found at https://mytechiethoughts.com/<post_address>
## Included files ## Included files
### bash template files Please refer to the readme.md in each subdirectory for a list and description of
each included file.
#### bash.rc ## The script file (customize.sh)
Included are *.bashrc* files for both new users (in the */etc/skel/* directory) The included script file copies all the files in this archive to the proper
and the root user. These files are the Debian default files. They are included locations on a default Debian system. It makes backups of your existing files
and copied so that user profiles start out at baseline settings and pull all in-place with the extension *.original*. This simply saves you time and
initial customizations from */etc/bash.bashrc*. Users are free to alter their possible errors copying the files manually. The structure of this archive
*.bashrc* as they see fit and those settings will override or add to the ones exactly mirrors a default Debian installation, so you can use that as a guide if
I've included in */etc/bash.bashrc* you choose not to use the script.
#### profile ### Running the script
This is the Debian default *profile* and is copied to */etc/profile* to return Please note you must either make the script executable or call it explicitly via
the system to a baseline configuration. Again, this is done to ensure that only BASH. In the latter case, you'd run the script as follows:
*/etc/bash.bashrc* is providing initial customizations to users.
#### bash.bashrc ```bash
/bin/bash ./customize.sh
```
Of the bash customization files, this is the only one that is NOT in a default If you want to make the script executable:
configuration. I have added the following customizations I find useful
especially for new users and system admins:
- colourized directory listings with built-in automatic colour settings ```bash
- changed prompt to include 24-hour clock, username, hostname and current chmod +x customize.sh
directory display ./customize.sh
- username changes to RED when working as ROOT (uid=0) ```
- added the following command aliases
alias|full command|explanation Due to location of the files being replaced, **you MUST run this script as ROOT**
---|---|--- (the script will exit if you run as a different user) or run it via sudo like
ll|ls -l|default 'ls' output this (assuming you made it executable):
l|ls -lAsh --group-directories-first|far more useful and robust file display including sizes, permissions and owners
rm|rm -i|confirmation prompt when deleting file
mv|mv -i|confirmation prompt when moving file would result in overwriting existing file
cp|cp -i|confirmation prompt when copying file would result in overwriting existing file
### nano defaults (nanorc) ```bash
sudo ./customize.sh
```
The following options have been enabled/set in nano to provide what I feel is an ### Passing a custom path to the script
easier editing experience especially for people coming from a Windows background
and new users/admins.
- 'rebind' numeric keypad to fix problems with using keypad with some SSH clients If you want to test out the script before having it update your actual system
- set 'smart home' some home key is useful configuration, you can supply an alternate destination path. This is referred
- allow opening multiple files at once to as a 'Base Path' by the script and it will show a warning if this option is
- always display line numbers used. Please note, your 'Base Path' MUST have the same directory structure as
- constantly display cursor position at the bottom of the screen an actual system, so the expected directories must already exist or the script
- set vim lock-files will just throw errors and not actually copy files.
- autoindent ON, tab-size of 4 spaces
- convert tabs to spaces
- turn off hard line wrapping
- turn ON soft line wrapping for ease of readability
- closing 'brackets' (for alignment purposes) set as: "')>]}
- cut to end of line by default
- set proper bracket matching (ie. "<" matches ">", etc.)
- turned on default colours so nano doesn't look so drab
- added the following key-bindings
binding|fuction Let's assume you wanted to test the script and copy files to */testdir*. You
---|--- would do the following prepare the directory with the expected structure:
alt-c/alt-C|copy selected text
alt-x/alt-X|cut selected text
alt-v/alt-V|paste text on clipboard
### time syncronization settings (timesyncd.conf) ```bash
mkdir -p /testdir/root
mkdir -p /testdir/etc/{skel,ssh,systemd}
```
This file configures *systemd-timesyncd.service* and allows for very simple Then you could invoke the script as follows:
NTP-sync setup. Simply edit the **NTP=* to list your desired timeservers,
each separated by a single space. In the event those timeservers are not
available, you can configure back servers by listing them on the
**FallbackNTP=** line, again space delimited.
I've set the default in this file to be the worldwide NTP.org servers. This ```bash
should work for pretty much anyone that uses this file, but you really should customize.sh /testdir
customize the list to use geographically closer timeservers or the timeserver on ```
your LAN, etc.
### SSH server configuration (sshd_config) The script would then copy all files into */testdir* while mirroring the
structure of a live system beneath that. Again, this is useful only for testing
and will NOT update your actual system!
## Final thoughts