To change the root password:
sudo passwd
To change your user password:
passwd
To change other users password:
sudo passwd USERNAME
ref: change-password-on-root-user-and-user-account
sudo nano /etc/hosts
- then rename
and
hostnamectl set-hostname new-hostname
ref : how-do-i-change-the-hostname
cat /proc/sys/net/ipv4/ip_forward
sudo nano /etc/sysctl.conf
sudo /etc/init.d/procps restart
cat /proc/sys/net/ipv4/ip_forward
cat /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/ip_forward
ref: how-to-make-ip-forwarding-permanent
sudo apt-get update
sudo apt-get install openssh-server
ref : why-am-i-getting-a-port-22-connection-refused-error
Install your foo.deb
file with sudo dpkg -i foo.deb
.
If there are some errors with unresolved dependencies, run sudo apt-get install -f
or sudo apt-get install -f --fix-missing
afterwards.
ref: how-to-install-a-deb-file-by-dpkg
Given a CA certificate file alamin.crt
, follow these steps to install it on Ubuntu:
- [ Optional ] Create a directory for extra CA certificates in
/usr/share/ca-certificates
:
sudo mkdir /usr/share/ca-certificates/extra
- Copy the
CA
.crt
file to this directory:
sudo cp alamin.crt /usr/share/ca-certificates/extra/alamin.crt
- Let Ubuntu add the
.crt
file's path relative to/usr/share/ca-certificates
to/etc/ca-certificates.conf
:
sudo dpkg-reconfigure ca-certificates
-
In case of a .pem file on Ubuntu, it must first be converted to a
.crt
file:openssl x509 -in foo.pem -inform PEM -out foo.crt
sudo update-ca-certificates
ref: Installing a root/CA Certificate in ubuntu
Your interface is not in promiscous mode. Use:
ip link set eth1 promisc on
netstat -i
The flag will be updated to BMPRU
. Flag details are as follows:
B
flag is for broadcastM
flag is for multicastP
flag is for promisc modeR
is for runningU
is for up
ref: configure-a-network-interface-into-promiscuous-mode
- ref: Linux command line for you and me Documentation By Kushal Das
- ref: best-linuxunix-command-cheat-sheet
cat filename
- to see the content of a file
head filename
- to see first 10 lines of the content of a file
head -20 filename
- to see first 20 lines of the content of a file
tail filename
- to see last 10 lines of the content of a file
tail -20 filename
- to see last 20 lines of the content of a file
nl filename
- to see the content of a file with number
cat filename | grep some_text
- to see the content of a file with filtered text only
more filename
- to see the content of a file with scrolling option
less filename
- to see the content of a file with scrolling option
/keyword
- you can search a keyword inside the file, n
press n to search next occurance
sed s/mysql/MYSQL/2 /etc/snort/snort.conf > snort2.conf
- to find and replace, The s command performs the substitution: you first give the term you are searching for (mysql) and then the term you want to replace it with (MySQL), separated by a slash (/). The g flag tells Linux that you want the replacement performed globally. Then the result is saved to a new file named snort2.conf.
==================================================================================================================================================
sudo spctl --master-disable
sudo spctl --master-enable
Before you generate an SSH key, you can check to see if you have any existing SSH keys.
- Open Terminal.
Enter
ls -al ~/.ssh
to see if existing SSH keys are present:$ ls -al ~/.ssh
Lists the files in your.ssh
directory, if they exist Check the directory listing to see if you already have a public SSH key.
TEMP
alias tmc='/Users/alamin/work/gitLab/machine-learning/MOOC_Data_Analysis_with_Python_Summer_2019/./tmc'
NOTICE the /./ at the end,
For PERMANENT
ln -s /Users/alamin/work/gitLab/machine-learning/MOOC_Data_Analysis_with_Python_Summer_2019/./tmc /usr/local/bin/tmc
reference: configure-a-network-interface-into-promiscuous-mode