From a3628fc49db4d88ff3e4067268650710d1da3f6f Mon Sep 17 00:00:00 2001
From: Silvino Silva Just to be sure, setup bash as default login;
+
+ Description of configuration files; Example of ~/.profile; Example of ~/.bashrc; Example of ~/.bash_profile;
+ This is part of the Tribu System Documentation.
+ Copyright (C) 2020
+ Tribu Team.
+ See the file Gnu Free Documentation License
+ for copying conditions.
- This is part of the Tribu System Documentation.
- Copyright (C) 2020
- Tribu Team.
+ This is part of the LeetIO System Documentation.
+ Copyright (C) 2021
+ LeetIO Team.
See the file Gnu Free Documentation License
for copying conditions.2.5.2. Bash
+
+
+ $ chsh
+
+
+
+
+
+ 2.5.2.1. Profile
+
+
+ export GPG_AGENT_INFO # the env file does not contain the export statement
+ export SSH_AUTH_SOCK # enable gpg-agent for ssh
+
+ export GPGKEY=XXXXXXXX
+
+ # ssh-agent to ask only ounce for password
+ SSH_ENV="$HOME/.ssh/environment"
+ function start_agent {
+ echo "Initialising new SSH agent..."
+ /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
+ echo succeeded
+ chmod 600 "${SSH_ENV}"
+ . "${SSH_ENV}" > /dev/null
+ /usr/bin/ssh-add;
+ }
+
+ # Source SSH settings, if applicable
+ if [ -f "${SSH_ENV}" ]; then
+ . "${SSH_ENV}" > /dev/null
+ #ps ${SSH_AGENT_PID} doesn't work under cywgin
+ ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
+ start_agent;
+ }
+ else
+ start_agent;
+ fi
+
+ # Weston
+ if test -z "${XDG_RUNTIME_DIR}"; then
+ export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
+ if ! test -d "${XDG_RUNTIME_DIR}"; then
+ mkdir "${XDG_RUNTIME_DIR}"
+ chmod 0700 "${XDG_RUNTIME_DIR}"
+ fi
+fi
+
+ 2.5.2.2. Bash RC
+
+
+ # If not running interactively, don't do anything
+ case $- in
+ *i*) ;;
+ *) return;;
+ esac
+
+
+ # check the window size after each command and, if necessary,
+ # update the values of LINES and COLUMNS.
+ shopt -s checkwinsize
+
+
+ # don't put duplicate lines or lines starting with space in the history.
+ # See bash(1) for more options
+ HISTCONTROL=ignoreboth
+
+ # append to the history file, don't overwrite it
+ shopt -s histappend
+
+ # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+ HISTSIZE=1000
+ HISTFILESIZE=2000
+
+ alias tmux="tmux -2"
+
+ alias rm='rm -i'
+ #alias cp='cp -i'
+ alias mv='mv -i'
+ # Prevents accidentally clobbering files.
+ alias mkdir='mkdir -p'
+
+ alias h='history'
+ alias j='jobs -l'
+ alias which='type -a'
+ alias ..='cd ..'
+
+ # Generate a password
+ genpasswd () {
+ local l=$1
+ [ "$l" == "" ] && l=20
+ tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
+ }
+
+ # Git graph log
+ glog () {
+ git log --graph --abbrev-commit --decorate --date=relative --all
+ }
+
+ if [[ -z "$TMUX" ]] ;then
+ ID="`tmux ls | grep -vm1 attached | cut -d: -f1`" # get the id of a deattached session
+ if [[ -z "$ID" ]] ;then # if not available create a new one
+ tmux new-session
+ else
+ tmux attach-session -t "$ID" # if available attach to it
+ fi
+ fi
+
+
+ 2.5.2.3. Bash profile
+
+
+ #!/bin/bash
+ if [ -f ~/.profile ]; then
+ source ~/.profile
+ fi
+
+ if [ -f ~/.bashrc ]; then
+ source ~/.bashrc
+ fi
+
+
+
+ Core OS Index
+
This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/bash.html b/linux/bash.html index f49d27e..1a7edb2 100644 --- a/linux/bash.html +++ b/linux/bash.html @@ -5,7 +5,7 @@- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/configure.html b/linux/configure.html index a548e5d..2e72c90 100644 --- a/linux/configure.html +++ b/linux/configure.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/dash.html b/linux/dash.html index a9aebee..8da34a3 100644 --- a/linux/dash.html +++ b/linux/dash.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/exim.html b/linux/exim.html index 028bfce..5cfed62 100644 --- a/linux/exim.html +++ b/linux/exim.html @@ -5,7 +5,7 @@- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/hardening.html b/linux/hardening.html index 041f999..0fd13e3 100644 --- a/linux/hardening.html +++ b/linux/hardening.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexAdd unnecessary tests to profile to have less noise.
- Core OS Index -This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/index.html b/linux/index.html index 089d143..33578f7 100644 --- a/linux/index.html +++ b/linux/index.html @@ -2,15 +2,15 @@ -Core OS covers installation and configuration of +
GNU/Linux covers installation and configuration of basic functionality of Crux 3.5 Gnu\Linux operating system. This documentation try's to follow Crux HandBook installation method diverges, for example, by only installing and @@ -162,9 +162,9 @@ Documentation Index
- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/install.html b/linux/install.html index 64fbe02..f42f4a2 100644 --- a/linux/install.html +++ b/linux/install.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/linux.html b/linux/linux.html index 9d568e9..3d992e9 100644 --- a/linux/linux.html +++ b/linux/linux.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/network.html b/linux/network.html index 0d359f3..ec33b25 100644 --- a/linux/network.html +++ b/linux/network.html @@ -5,7 +5,7 @@- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/package.html b/linux/package.html index 5235d01..4b68b6a 100644 --- a/linux/package.html +++ b/linux/package.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/ports.html b/linux/ports.html index 78607bd..28047c5 100644 --- a/linux/ports.html +++ b/linux/ports.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux Index- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/reboot.html b/linux/reboot.html index 1a4783b..f8ab278 100644 --- a/linux/reboot.html +++ b/linux/reboot.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/samhain.html b/linux/samhain.html index 4c940ef..f679749 100644 --- a/linux/samhain.html +++ b/linux/samhain.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux Index- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/sysctl.html b/linux/sysctl.html index 3b1d492..9940d43 100644 --- a/linux/sysctl.html +++ b/linux/sysctl.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/toolchain.html b/linux/toolchain.html index 23f5655..1ee7c89 100644 --- a/linux/toolchain.html +++ b/linux/toolchain.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/tty-terminal.html b/linux/tty-terminal.html index 4da3798..77c7b9d 100644 --- a/linux/tty-terminal.html +++ b/linux/tty-terminal.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/tools/dnsmasq.html b/tools/dnsmasq.html index 7c923dd..4d738e4 100644 --- a/tools/dnsmasq.html +++ b/tools/dnsmasq.html @@ -83,9 +83,9 @@ Tools Index- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.