updated readme

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

115
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
---|---|---
ll|ls -l|default 'ls' output
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) 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
this (assuming you made it executable):
The following options have been enabled/set in nano to provide what I feel is an ```bash
easier editing experience especially for people coming from a Windows background sudo ./customize.sh
and new users/admins. ```
- 'rebind' numeric keypad to fix problems with using keypad with some SSH clients ### Passing a custom path to the script
- set 'smart home' some home key is useful
- allow opening multiple files at once
- always display line numbers
- constantly display cursor position at the bottom of the screen
- set vim lock-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 If you want to test out the script before having it update your actual system
---|--- configuration, you can supply an alternate destination path. This is referred
alt-c/alt-C|copy selected text to as a 'Base Path' by the script and it will show a warning if this option is
alt-x/alt-X|cut selected text used. Please note, your 'Base Path' MUST have the same directory structure as
alt-v/alt-V|paste text on clipboard an actual system, so the expected directories must already exist or the script
will just throw errors and not actually copy files.
### time syncronization settings (timesyncd.conf) 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:
This file configures *systemd-timesyncd.service* and allows for very simple ```bash
NTP-sync setup. Simply edit the **NTP=* to list your desired timeservers, mkdir -p /testdir/root
each separated by a single space. In the event those timeservers are not mkdir -p /testdir/etc/{skel,ssh,systemd}
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 Then you could invoke the script as follows:
should work for pretty much anyone that uses this file, but you really should
customize the list to use geographically closer timeservers or the timeserver on
your LAN, etc.
### SSH server configuration (sshd_config) ```bash
customize.sh /testdir
```
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