158 lines
3.0 KiB
Markdown
158 lines
3.0 KiB
Markdown
<h1 align="center" id="heading"> 101 </h1>
|
|
|
|
|
|
<details>
|
|
<summary markdown="span"> Get Time and Date for History command </summary>
|
|
<br>
|
|
|
|
Send:
|
|
```
|
|
HISTTIMEFORMAT='%Y-%m-%d %T " && history
|
|
```
|
|
Or make it permanent:
|
|
|
|
```
|
|
nano ~/.bashrc
|
|
```
|
|
|
|
search for `HISTCONTROL` and under it enter:
|
|
|
|
```
|
|
HISTTIMEFORMAT='%Y-%m-%d %T "
|
|
```
|
|
|
|
save and should now be permanent
|
|
|
|
______________________________________________________________________________________________________
|
|
</details>
|
|
<!-- -->
|
|
<details>
|
|
<summary markdown="span"> See Matrix </summary>
|
|
<br>
|
|
|
|
Install:
|
|
```
|
|
sudo apt-get install -y cmatrix
|
|
```
|
|
|
|
Run:
|
|
```
|
|
cmatrix
|
|
```
|
|
|
|
To Uninstall run:
|
|
```
|
|
sudo apt-get purge -y cmatrix
|
|
```
|
|
|
|
______________________________________________________________________________________________________
|
|
</details>
|
|
<!-- -->
|
|
<details>
|
|
<summary markdown="span"> GNOME Terminal Hide/Unhide MenuBar </summary>
|
|
<br>
|
|
|
|
to Hide send and restart the terminal:
|
|
```
|
|
gsettings set org.gnome.Terminal.Legacy.Settings headerbar true
|
|
```
|
|
|
|
to Unhide send and restart the terminal:
|
|
```
|
|
gsettings set org.gnome.Terminal.Legacy.Settings headerbar false
|
|
```
|
|
______________________________________________________________________________________________________
|
|
</details>
|
|
<!-- -->
|
|
<details>
|
|
<summary markdown="span"> Shotcuts </summary>
|
|
<br>
|
|
|
|
```
|
|
Go to the end of the line | CTRL + I
|
|
Go to the begining of the line | CTRL + A
|
|
Delete all line | CTRL + U
|
|
sort results in columns | cmnd | column -t
|
|
|
|
```
|
|
|
|
______________________________________________________________________________________________________
|
|
</details>
|
|
<!-- -->
|
|
<details>
|
|
<summary markdown="span"> Add Custom Folder to .bashrc </summary>
|
|
<br>
|
|
|
|
Edit bashrc:
|
|
```
|
|
nano ~/.bashrc
|
|
```
|
|
|
|
at the end of the file add:
|
|
|
|
```
|
|
if [ -f ~/.sthope_scripts/.bash_aliases ]; then
|
|
. ~/.sthope_scripts/.bash_aliases
|
|
fi
|
|
|
|
export PATH=$PATH:~/.sthope_scripts/commands/
|
|
```
|
|
|
|
Save and reboot
|
|
|
|
______________________________________________________________________________________________________
|
|
</details>
|
|
<!-- -->
|
|
<details>
|
|
<summary markdown="span"> Custom commands </summary>
|
|
<br>
|
|
|
|
Edit bashrc:
|
|
```
|
|
nano ~/.bashrc
|
|
```
|
|
|
|
at the end of the file add:
|
|
|
|
```
|
|
if [ -f ~/.sthope_scripts/.bash_aliases ]; then
|
|
. ~/.sthope_scripts/.bash_aliases
|
|
fi
|
|
|
|
export PATH=$PATH:~/.sthope_scripts/commands/
|
|
```
|
|
|
|
Save and reboot
|
|
|
|
```
|
|
nano ~/.sthope_scripts/.bash_aliases
|
|
```
|
|
|
|
And add:
|
|
|
|
```
|
|
alias w2='git add . && git commit -m "update" && git push'
|
|
alias mkdir='mkdir -p'
|
|
alias a1='sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y'
|
|
alias a2='sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get -y install'
|
|
alias jan='cal -m 01'
|
|
alias feb='cal -m 02'
|
|
alias mar='cal -m 03'
|
|
alias apr='cal -m 04'
|
|
alias may='cal -m 05'
|
|
alias jun='cal -m 06'
|
|
alias jul='cal -m 07'
|
|
alias aug='cal -m 08'
|
|
alias sep='cal -m 09'
|
|
alias oct='cal -m 10'
|
|
alias nov='cal -m 11'
|
|
alias dec='cal -m 12'
|
|
```
|
|
|
|
Add more
|
|
```
|
|
alias your_custom_cmd='what_will_do'
|
|
```
|
|
______________________________________________________________________________________________________
|
|
</details>
|