Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Wednesday, 6 February 2019

PHP Environment in Linux

Reference: 
Install Mosh under Linux:
apt-get install mosh
To connect to the remote server:
mosh --ssh="ssh -i ubun-exp_steven.pem -p 22" ubuntu@54.69.70.40
mosh --ssh="ssh -i ~/.ssh/id_rsa -p 22" steven@54.69.70.40
Create a new user:
useradd -m -s /bin/bash -c 'git user' steven
Add user to sudo (admin) group:
usermod -aG sudo steven
id steven
Set up basic environment:
git clone https://github.com/junxie6/config_centos_v2.git
bash config_centos_v2/script/setHomeConfig.sh
exit

Linux Command Cheat Sheet

Cheat Sheet
Below is a Cheat Sheet of Linux commands we have learned in this tutorial
Command
Description
ls
Lists all files and directories in the present working directory
ls - R
Lists files in sub-directories as well
ls - a
Lists hidden files as well
ls - al
Lists files and directories with detailed information like permissions, size, owner, etc.
cat > filename
Creates a new file
cat filename
Displays the file content
cat file file2 > file3
Joins two files (file1, file2) and stores the output in a new file (file3)
mv file "new file path"
Moves the files to the new location
mv filename new_file_name
Renames the file to a new filename