Translate

start learning ubuntu

 I am start learning Linux and  update every day on this page.

UBUNTU 18.4

After installation 

 sudo apt update



sudo apt upgrade



3rd ster : sudo apt auto remove



Note: whenever upgrade command run must require to run the command of "sudo apt autoremove".

 reboot command :


to fix any upgrade use : sudo apt --fix-broken install

To know your user name : whoami

> TO ZOOM TERMINAL 

CTRL+SHIFT+ “+”

>TO ZOOM OUT TERMINAL 

CTRL+SHIFT+ “-”



 

 Uninstall Googlechrome

  • sudo apt purg google-chrome-stable
  • remove the "google chrome " folder /home/username/ .config
  • rm -rf /home/username/.config/google-chrome
  • also remove the "google chrome" folder /home/username/ .cache
  • rm -rf /home/username/.cache/google-chrome



 startup error of Ubuntu 



To know the step click the video link below:
link :


to make directory use

command : mkdir


How to add host name:
 sudo nano /etc/hostname

 how to add hosts:

sudo nano /etc/hosts
Install vim
sudo apt install vim
to write use "w" for quit use "q".

1. Ctrl + Shift + N => New terminal window 

This shortcut can be used to open a new terminal window. For this to work, you should already be on the terminal window. 


2. Ctrl + Shift + T => New terminal tab 

If you use above combination, you can open terminal tab on same window. 


3. Ctrl + C or Ctrl + Z => Kill the current process 

If you are running any application through the terminal, you can kill it by using the above combination. 


4. Ctrl + R => Reverse search 

If you are working in the IT industry or you are a college student, many times the same command repeats. To search previously entered command, we can use above combination. 


5. Ctrl + U => Delete line 

This shortcut will delete the whole line before the cursor. 


6. Ctrl + W => Delete the word 

This shortcut will delete the whole word before the cursor. 


7. Ctrl + K => Delete the word 

This shortcut will delete the whole line after the cursor. 


8. Ctrl + Y => Undo erased content 

If you have mistakenly deleted some content using Ctrl + U, Ctrl + W or Ctrl + K and now you want to undo the change. You can do so by using the above combination. 


9. Ctrl + L => Clear console 

This is similar to clear command used to clear the console. 


10. Ctrl + Shift + C => Copy 

This shortcut is used to copy the selected content. 


11. Ctrl + Shift + V => Paste the content from the clipboard 

This shortcut is used to paste the content copied in the clipboard. 


12. Alt + F => Move forward 

This combination is used to move one word forward. Alternatively, we can use the Ctrl + right arrow to do so. 


13. Alt + B => Move one word backward 

This combination is used to move one word backward. Alternatively, we can use the Ctrl + left arrow to do so. 


14. Arrow Up / Down => Browse commands 

To go through the previously executed commands, we can use up or down arrow keys. 


15. Alt + D => Delete line 

This is similar to the Ctrl + U, except it removes line after cursor. 


16. Shift + PgUp/PgDn => Scroll through console 

We can use the above combination to scroll up or scroll down through the console. 


17. Ctrl + PgUp => Switch to left tab 

We have seen we can use the Ctrl + Shift + T to open a new terminal tab. To move to the left tab, we can use the above shortcut. 


18. Ctrl + PgDn => Switch to right tab 

Similarly, we can use above shortcut to move to right tab. 


19. Ctrl + Shift + PgUp => Move current tab to left 

We can use the above shortcut to move the current tab to left. 


20. Ctrl + Shift + PgDn => Move current tab to right 

We can use the above shortcut to move the current tab to right. 


21. Ctrl + D => Close terminal 

This combination is used to close the current tab. If there is only one tab, it’ll close the terminal window. 


22. Ctrl + P => Previous executed command 

We can go through the previously executed sequence of commands using the above shortcut. 

23. Ctrl + N => Next executed command 

We can go through the next executed sequence of commands using the above shortcut. 


24. Ctrl + J => Enter 


25. Ctrl + Alt + T => Open terminal 


26. Ctrl + Shift + Q => Close all 

This will close all tabs on the current terminal window. This will not close the other open terminal windows. 


27. Super + RowUp => Maximize 

This is used to maximize the terminal window. 


28. Super + RowDown => Minimise 

This is used to minimize the terminal window. 


29. Ctrl + Shift + F => Find 

Similar to Ctrl + F on any text editor, we can use the above shortcut to find through the terminal console. 


30. Alt + C => Capitalizes the word next to the cursor and move to end of the word 

For Example: Suppose a word hangout and cursor is before hangout, the above shortcut will capitalize ‘h’ of hangout and go to the end of the word. 


31. Use of Tab => To get suggestions 

We can enter a partial initial command such as MySQL, and we’ll get a list of the commands that start with MySQL.


To add user :
sudo add user username
sudo passwd username
To check all user : ls /home

To know the user id : id username
 
To change the password of user :

student@ubuntu:~$ sudo passwd employ
[sudo] password for student: 
Sorry, try again.
[sudo] password for student: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
tTo Delete the user id :

sudo usrdel username
To set root password : 
 sudo passwd root
To set make user group : 

student@ubuntu:~$ sudo groupadd admin
student@ubuntu:~$ sudo groupadd user
student@ubuntu:~$ sudo groupadd hr



To delete group :

sudo groupdel user
To check disk space
df -Th | grep "dev/sda"
To auto clean :
sudo apt-get autoclean
sudo snap remove vokoscareen-ng
sudo apt-get autoclean
cat updat.sh
./update.sh
Build up cache database which you can clean up to get some free space on your hard drive :

cd /var/cache/apt
ls
sudo du  -sh  .
sudo apt-get clean


Clean Journalctl space

sudo journalctl --disk-usage
sudo journalctl --rotate
sudo journalctl --vaccum-time 1d
sudo journalctl --vacuum-time 1d
sudo journalctl --disk-usage



Flush the system cache:
sudo systemd-resolve --statistics
sudo systemd-resolve --flush-caches



How to Set IP address :

student@ubuntu:/$ cd /etc/netplan
student@ubuntu:/etc/netplan$ ip a
student@ubuntu:/etc/netplan$ ls
01-network-manager-all.yaml
student@ubuntu:/etc/netplan$ sudo nano 01-network-manager-all.yaml

ethernets:
 enp0s3:
  dhcp4: no
  addresses: [192.168.1.7/24] 
  gateway4: 192.168.1.2
nameservers:
    addresses: [8.8.8.8,8.8.4.4]




What type of shell support on Ubuntu to know use 

cat /etc/shells


To solve this problem using this command:
 root@ubuntu:~# apt-get dist-upgrade
apt-get install --fix-missing

******************
apt install xrdp
systemctl enable --now xrdp
sudo netstat -ntlp | grep LISTEN
sudo ufw allow from any to any port 3350 porto tcp

........................................................................................................................................
How to install putty on ubuntu

student@ubuntu:~/Desktop$ sudo apt-get install putty

student@ubuntu:~/Desktop$ putty




Install Wire shark in Ubuntu :

sudo apt-add-repository ppa:wireshark-dev/stable
sudo apt update
sudo apt-get install wireshark

Install Wine:


Link:https://wiki.winehq.org/Ubuntu

1>  sudo dpkg --add-architecture i386 
2>  wget -nc https://dl.winehq.org/wine-builds/winehq.key sudo apt-key add winehq.key
3> sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
4> sudo apt update
5> sudo apt install --install-recommends winehq-stable 

if number 5 command not working then use : sudo apt install wine-stable


6> clear
7> wine --version
8> wine 
9> wine --help
10> winecfg
# go to "Applications" and change the "windows version:10" and apply
#then go to "home" > enable "hidden file" > open "wine" >drive c > 



How to install SSH:
 apt-get install ssh

















Comments