Sunday, October 21, 2018

Basics Ubuntu Terminal commands





Some basics command to use terminal in Ubuntu Linux

S. NO
COMMAND
EXAMPLE
BRIEF DESCRIPTION
1.
cd <folder_name>
ntf-22@NTF-22:~$ cd /home/ntf-22/
To enter in a folder
2
cd  ..
ntf-22@NTF-22:~$ cd ..
exit from a folder
3
cd  /..
ntf-22@NTF-22:~$ cd /..
Exit from all folder and move at root
4
pkill  <software_name>
ntf-22@NTF-22:/$ pkill geany
Used to close specific software.
5
<software name>
ntf-22@NTF-22:/$ geany
Open directly through terminal
6
ssh username@domain
ntf-22@NTF-22:~$ ssh ntf-15@192.168.1.101

Connect other system using terminal
7
sudo mv frompath topath
ntf-22@NTF-22:/$ sudo mv opt/lampp/htdocs/swati-drupal home/ntf-22/Downloads

Move folder from terminal




8
sudo frompath/foldername  topath/folderRename
ntf-22@NTF-22:/$ sudo mv opt/lampp/htdocs/swati-drupal home/ntf-22/Downloads/swati-move
Move and Rename  folder using terminal
9
grep sshd /var/log/auth.log
ntf-22@NTF-22:~$ grep sshd /var/log/auth.log

Know whoes access your system and when .
10
gksu gedit /etc/hosts
ntf-22@NTF-22:~$ gksu gedit /etc/hosts
Search your website which you want to unblock and delete, if you want to block add url of the site.
11
mkdir <filename>
ntf-15@NTF-15:~/Music$ mkdir tt

Creating folder using command
11
rmdir <filename>

ntf-15@NTF-15:~/Music$ rmdir tt
Remove Folder Using command.
12
pwd
ntf-15@NTF-15:~$ pwd

Print Current Working Directory
Show in which directory are you working.
13
ls
ntf-15@NTF-15:~$ ls
Print List of Directory
14
history -c
ntf-22@NTF-22:/$ history -c
Clear history of open terminal.
15
cp -R source destination
ntf-22@NTF-22:~/Downloads$ cp -R /home/ntf-22/Downloads/testing /home/ntf-22/Desktop/
Copy and paste from terminal you can also copy and paste your file
16
zip -r folder.zip folder
ntf-22@NTF-22:~/Downloads$ zip -r testing.zip /home/ntf-22/Downloads/testing
Create zip file using terminal
17
pathwhereyouwanttoxtract$ unzip folder.zip
ntf-22@NTF-22:~/Downloads$ unzip drupal8.zip

Extract folder using terminal
18
$ passwd
ntf-22@NTF-22:~$ passwd

Change password for
system
19
$ scp source_path  user@domain:/destinationpath
ntf-22@NTF-22:~$ scp /home/ntf-22/Downloads/test.php ntf-15@192.168.1.101:/home/ntf-15/Desktop

Put file in other system
20
$ scp user@domain:/path yourpath
ntf-22@NTF-22:~$ scp ntf-15@192.168.1.101:/home/ntf-15/Desktop/t.png /home/ntf-22/Desktop/
Get from other system
21
php -m
ntf-22@NTF-22:~$ php -m
it shows the list of enable module in php
22
php -m | grep <name of extention>

ntf-15@NTF-15:/$ php -m | grep ctype

Checking extension enable or not in your php server
23
sudo apt-get install php7.0- <name of extention>
ntf-15@NTF-15:/$ sudo apt-get install php7.0-dom
To install php extension in server

No comments:
Write comments