Skip to content

Instantly share code, notes, and snippets.

@tareq3
Last active December 2, 2018 16:26
Show Gist options
  • Save tareq3/b401e4e03d1a336edf2bfa0f01341f7e to your computer and use it in GitHub Desktop.
Save tareq3/b401e4e03d1a336edf2bfa0f01341f7e to your computer and use it in GitHub Desktop.
Command for linux Distros

For Opening Terminal

cntl+alt+t

For Getting into The home dir of any user.. Where Desktop, Music, Picture folders exists.

cd

For Getting into The Root dir of the pc.. Where Home dir located.

cd /

For Listing Items and Folder on Current Path

ls

For Listing along with hidden files

ls -a

for showing the path of the directory we are now

pwd

Make Dir

 mkdir testDir

get Back from any directory

cd ..

select or ender any directory [Directory Names are case sensative]

cd directoryName

create file

touch first.txt

Remove single file by name

rm fileName

Remove All file

rm *

Remove dir with all files

rm -R dir

Remove dir and files with using file name

rm -rf dir

Showing any Text file in console

cat fileName.txt

for Editing Text File

nano fielname.txt

Rename file name

mv preFileName curFileName

copy any file

cp fileName newFileName

copy any file to Any Dir

cp fileName.txt ~/dirName/newFileName.txt 

Advance

For finding path of any software

which mongod

For installing any package in ubunto as admin

sudo apt-get install git-core 

For installing any package in ubunto Not as admin

apt-get install git-core 

For UnInstalling or Remove any package in ubunto Not as admin

sudo apt-get remove filezella 

For Cheaking Update of any package in ubunto as admin

sudo apt-get update 

For Machine Information with date time

uname -a

###Config File

ifconfig

SSH login

generating public/private rsa key pair to the client machine

ssh-keygen -t rsa

copy public rsa key to the server authorizekeys list

ssh-copy-id userName@host

ssh-copy-id root@103.106.56.38 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment