- Generate the SSH key (if not already):
cd ~/.ssh
ssh-keygen -t ed25519 -C "[email protected]"
- Copy the SSH key to Cheaha:
ssh-copy-id -i id_ed25519.pub [email protected]
- Close the terminal and try to login using SSH:
ssh [email protected]
cd ~/.ssh
ssh-keygen -t ed25519 -C "[email protected]"
ssh-copy-id -i id_ed25519.pub [email protected]
ssh [email protected]
cd ~/.ssh
ssh-keygen -t ed25519 -C "[email protected]"
ssh-copy-id -i id_ed25519.pub [email protected]
ssh [email protected]
cd ~/.ssh
ssh-keygen -t ed25519 -C "[email protected]"
cat id_ed25519.pub
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda
export PATH=/usr/local/cuda-12.0/bin${PATH:+:${PATH}}
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0
➜ ~ nvidia-smi
Wed Feb 8 15:55:17 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A |
| N/A 43C P8 8W / 55W | 6MiB / 6144MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 2117 G /usr/lib/xorg/Xorg 4MiB |
+-----------------------------------------------------------------------------+
.zshrc
file:# add cuda
export PATH=/usr/local/cuda-12.0/bin${PATH:+:${PATH}}
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update\n
sudo apt install libnccl2=2.16.5-1+cuda12.0 libnccl-dev=2.16.5-1+cuda12.0
nvcc -o nccl_example nccl_example.cu -lnccl
./nccl_example
sudo apt install git
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
sudo apt install zsh
sudo apt install git
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
zsh
as default shell:
chsh -s `which zsh`
MySql Client:
The mysql-client
package allows you to connect to a MySQL server. It will give you the mysql
command-line program.
MySql Server:
The mysql-server
package allows to run a MySQL server which can host multiple databases and process queries on those databases.
Update Ubuntu
sudo apt update
Upgrade Ubuntu
sudo apt upgrade
Install MySQL Server
sudo apt install mysql-server
Enter root user password if asked.
Install MySQL Client
sudo apt install mysql-client
Configure MySQL
sudo mysql_secure_installation
[sudo] password for USER_NAME_OF_MACHINE:
Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No:
Please set the password for root here.
New password:
Re-enter new password:
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) :
... skipping.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) :
... skipping.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
Test MySQL service
systemctl status mysql.service
Test connecting to database
sudo mysqladmin -p -u root version
Open Mysql Console
sudo mysql -p -u root
In case the MySQL is not running, start it with
sudo systemctl start mysql
In case you need to restart MySQL, restart it with
sudo systemctl restart mysql
Create database in MySQL console
create database cp_intrafish;
Install mysql-config
sudo apt-get install libmysqlclient-dev
Load Database dump to the newly created database. Here cp_intrafish
is the database name and myifm_dump.sql
is the SQL dump file.
mysql -p -u root cp_intrafish<myifm_dump.sql
Pretty output in MySQL console. Add \G
at the end of your command. This will change the output just for that command, without changing the default output.
SELECT * FROM product_price\G;
sudo apt-get -y install apache2
sudo apt-get -y install php libapache2-mod-php
sudo apt-get -y install php-mbstring php-mbstring php-gettext
systemctl restart apache2
php --version
sudo apt-get -y install phpmyadmin
sudo systemctl restart mysql.service
sudo nano /etc/apache2/apache2.conf
Include /etc/phpmyadmin/apache.conf
sudo systemctl restart apache2
http://localhost/phpmyadmin/
MySQL 5.7 changed the secure model: now MySQL root login requires a sudo.
I.e., phpMyAdmin will be not able to use root credentials.
The simplest, safest and permanent solution will be create a new user and grant required privileges.
sudo mysql --user=root mysql
some_pass
by the desired password:
CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY 'some_pass';
If you get ERROR 1396 (HY000): Operation CREATE USER failed for 'phpmyadmin'@'localhost'
, check if you have already an user called phpmyadmin
using:
select user,host from user;
Then give all privileges to the user:
GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
If your phpMyAdmin is connecting to localhost, this should be enough.
/var/www
directory:
➜ ~ whoami
arsho
➜ ~ sudo adduser arsho www-data
[sudo] password for arsho:
Adding user `arsho' to group `www-data' ...
Adding user arsho to group www-data
Done.
➜ ~ sudo chown -R www-data:www-data /var/www
➜ ~ sudo chmod -R g+rwX /var/www
python3 --version
Python 3.6.7
idle
or venv
in it.idle
:
sudo apt install idle
venv
:
sudo apt-get install python3-venv
python3 -m venv venv
source venv/bin/activate
flask
:
pip install flask
app.py
:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "Hello from Flask"
.flaskenv
:
FLASK_APP=app.py
FLASK_ENV=development
flask run
Steps to install Ubuntu 18.04 alongside pre installed Windows 10 as dual boot in NVMe SSD.
msinfo32
and press Enter.MBR
.Start
button.Search
.Control Panel
and hit Enter on your keyboard.Power Options
.Choose what the power buttons do
.Change settings that are currently unavailable
.Turn on fast startup (recommended)
.Save changes
.Boot Sequence
.Secure Boot
> Secure Boot Enable
, and set the checkbox to Disabled
.Secure Boot Mode
to audit mode
.Family & other users.
Add someone else to this PC.
I don't have this person's sign-in information.
Add a user without a Microsoft account.
Account type
of this newly created account to Administrator
.bcdedit /set {current} safeboot minimal
SATA Operation mode
to AHCI
from either IDE
or RAID
.bcdedit /deletevalue {current} safeboot
something else
./
partitionWindows Boot Manager
as Device for boot loader installation
.sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall