System administration: Difference between revisions

m
no edit summary
→‎Links: fail2ban
mNo edit summary
 
Line 43: Line 43:
Composer is a PHP package management tool.  Usually needed for setting up web application development environment.
Composer is a PHP package management tool.  Usually needed for setting up web application development environment.


<syntaxhighlight lang="console">
<syntaxhighlight lang="bash">
$ cd
$ cd
$ mkdir bin
$ mkdir bin
Line 70: Line 70:
The config file ~/.ssh/config stores information about various SSH connections, and allows the definition of hostname, username, ports, and other settings.
The config file ~/.ssh/config stores information about various SSH connections, and allows the definition of hostname, username, ports, and other settings.


<syntaxhighlight lang="html5">
<syntaxhighlight lang="linux-config">
Host hostname1
Host hostname1
     HostName hostname1.domain.com
     HostName hostname1.domain.com
Line 215: Line 215:


=== .gitconfig ===
=== .gitconfig ===
<syntaxhighlight lang="html5">
<syntaxhighlight lang="linux-config">
[core]
[core]
   editor = vim
   editor = vim
Line 322: Line 322:
* Show all of your running processes
* Show all of your running processes


<syntaxhighlight lang="console">
<syntaxhighlight lang="bash">
$ ps -fu mhan
$ ps -fu mhan
UID        PID  PPID  C STIME TTY          TIME CMD
UID        PID  PPID  C STIME TTY          TIME CMD
Line 386: Line 386:
== Pull a random line from a log ==
== Pull a random line from a log ==


<syntaxhighlight lang="console">
<syntaxhighlight lang="bash">
$ shuf -n 1 /etc/pihole/gravity.list
$ shuf -n 1 /etc/pihole/gravity.list
</syntaxhighlight>
</syntaxhighlight>