HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session...

47
HOW TO BUILD LINUX LEARNING LAB FOR FREE Proudly Presented by: LearnLinux.ca Learn Linux - kickstart your IT career

Transcript of HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session...

Page 1: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

HOW TO

BUILD LINUX

LEARNING LABFOR FREE

Proudly Presented by: LearnLinux.caLearn Linux - kickstart your IT career

Page 2: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Table of Contents

1. What is Linux?2. VMware Workstation Player Download3. VMware Workstation Player Install4. Download Ubuntu5. Install Ubuntu Linux (by Creating a new Virtual Machine)6. Update Ubuntu Linux to the latest7. Run Commands inside Ubuntu Linux8. Setup Secure Remote Access Server on Ubuntu Linux9. Download Secure Shell Client10. Run Commands inside Secure Shell Session11. What’s next?

Page 3: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

What is Linux?

The Linux operating system (OS) powers 98% of the world’s supercomputers, most Internet servers, millions of Android devices, cloud platforms, and more.

With Linux as the foundation for so much technology and innovation, job opportunities for peoplewith Linux skills are growing.

Linux is now critical to hot IT fields like big data, cloud computing, and cybersecurity.If you want to increase your job opportunities, knowing Linux can help.

At its core, Linux is software used to control hardware like desktop and laptop computers, supercomputers, mobile devices, networking equipment, airplanes, and automobiles; the list is endless. Linux is everywhere.

Linux is a trademark of Linus Torvalds

Page 4: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 1: Click on VMware Workstation Player Download button from

https://my.vmware.com/web/vmware/downloads

Page 5: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 2: On the next page, click on Download

Step 3: Click on Save File:

Page 6: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 4: Double Click on downloaded file Vmware-player-14.1.2-8497320.exe to install. Your file name may be different with its digits but should be always start with Vmware-player- and ending with .exe.

Step 5: Click on Next

Step 6: Accept theterm of license andclick on Next

Page 7: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 7: Check onEnhance keyboardDriver… and click Next

Step 8: Click Next

Page 8: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 9: Click Next

Step 10: Click Install

Page 9: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 11: You will seeprogress

Step 12: Click on Finish

Page 10: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 13: Click on Yes to have this process completed.

Step 14: Double click on Desktop Icon

Step 15: Click Continue

Page 11: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 16: Click on Finish

Page 12: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 17: Finally you will see:

Congratulation!

By completing these steps, you have successfully installed VMWare Workstation Player.

Page 13: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 18: Download Linux (Ubuntu in this case) from https://www.ubuntu.com/desktop

Step 19: Click Download Ubuntu

Page 14: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 20: Click Download

Page 15: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 21: Click OK

Step 22: Verify that you know where Ubuntu file ubuntu-18.04-desktop-amd64.iso is saved on your computer. Your file name may be different with its digits but should be always start with ubuntu- and ending with .iso.

Page 16: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Overview: By following these steps, you will be building your Linux Lab inside the VmWare Workstation Player

Step 23: Launch VmWare Workstation Player and click on Create a New Virtual Machine

Page 17: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 24: Select Installer discimage file (iso) and click onBrowse….

Page 18: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 25: Select ubuntu file and click on Open

Step 26: Click Next

Page 19: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 27: Fill in as:

Full name: SysAdminUser name: sysadminPassword: sysadmin Confirm: sysadmin

Step 28: Click Next

Page 20: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 29: Click Next

Step 30: Click on CustomizeHardware ….

Page 21: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 31: Change the memory size to 2048 MB, 4096 MB or higher and click on Close

Page 22: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 32: Click on Finish

Page 23: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 33: You will see progress….

Page 24: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 34: Click on Download and Install

Page 25: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 35: You will be asked to install and click on Yes. Step 36: You will see Ubuntu being installed

Page 26: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 37: Finally after a reboot (all by itself) you will see this Windows

Congratulation!

By completing these steps, you have successfully installed Ubuntu inside Vmware Workstation Player as a Virtual Machine (short form VM).

Page 27: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 38: Click on SysAdmin icon and type ‘sysadmin’ as password and click on Sign In

Page 28: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 39: Click on Next a couple times to see these screens…

Page 29: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 40: You may want to update your Ubuntu and click on Install Now

Page 30: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 41: Type password: sysadmin and click on Authenticate and see its progress

Page 31: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 42: Once Update is done, on the following click on Restart Now

Page 32: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 43: Upon reboot, Sign In again and right click on the desktop and click on Open Terminal

Page 33: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 44: You will see a black dialog box where you can start typing the commands.

Page 34: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 45: Let’s try a couple of commands. My favorite is knock knock, who is there. Second one is to know for how long the system has been up.

Page 35: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Overview: Here we will setup Secure Remote Access Server on Ubuntu Linux

Step 46: Let’s find the IP address of your Ubuntu installed. Click on Dots and then click on Settings icon

Page 36: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 47: Scroll down and select Network and then click on small gear icon

Page 37: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 48: Next opened pop-up box will show IPv4 Address that’s what we needed to connect to our Ubuntu Linux. Your IP Address could have different value.

Page 38: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 49: Installing sshd server for Secure Remote Shell Access on Ubuntu

sysadmin@ubuntu:~$ sudo apt-get install openssh-server Reading package lists... DoneBuilding dependency tree Reading state information... DoneThe following additional packages will be installed: ncurses-term openssh-sftp-server ssh-import-idSuggested packages: molly-guard monkeysphere rssh ssh-askpassThe following NEW packages will be installed: ncurses-term openssh-server openssh-sftp-server ssh-import-id0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.Need to get 637 kB of archives.After this operation, 5,316 kB of additional disk space will be used.Do you want to continue? [Y/n] YGet:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ncurses-term all 6.1-1ubuntu1.18.04 [248 kB]Get:2 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 openssh-sftp-server amd64 1:7.6p1-4 [45.5 kB]Get:3 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 openssh-server amd64 1:7.6p1-4 [332 kB]Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ssh-import-id all 5.7-0ubuntu1.1[10.9 kB]Fetched 637 kB in 1s (1,196 kB/s) Preconfiguring packages ...Selecting previously unselected package ncurses-term.(Reading database ... 161527 files and directories currently installed.)Preparing to unpack .../ncurses-term_6.1-1ubuntu1.18.04_all.deb ...Unpacking ncurses-term (6.1-1ubuntu1.18.04) ...Selecting previously unselected package openssh-sftp-server.Preparing to unpack .../openssh-sftp-server_1%3a7.6p1-4_amd64.deb ...Unpacking openssh-sftp-server (1:7.6p1-4) ...Selecting previously unselected package openssh-server.Preparing to unpack .../openssh-server_1%3a7.6p1-4_amd64.deb ...Unpacking openssh-server (1:7.6p1-4) ...Selecting previously unselected package ssh-import-id.Preparing to unpack .../ssh-import-id_5.7-0ubuntu1.1_all.deb ...Unpacking ssh-import-id (5.7-0ubuntu1.1) ...Setting up ncurses-term (6.1-1ubuntu1.18.04) ...Processing triggers for ufw (0.35-5) ...Processing triggers for ureadahead (0.100.0-20) ...Setting up openssh-sftp-server (1:7.6p1-4) ...Processing triggers for systemd (237-3ubuntu10) ...Processing triggers for man-db (2.8.3-2) ...Setting up ssh-import-id (5.7-0ubuntu1.1) ...Setting up openssh-server (1:7.6p1-4) ...

Creating config file /etc/ssh/sshd_config with new versionCreating SSH2 RSA key; this may take some time ...2048 SHA256:PNMfCweODMhwMFUKLyyN2RIB4xbAkHQXRn6coqrwte4 root@ubuntu (RSA)Creating SSH2 ECDSA key; this may take some time ...

Page 39: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

256 SHA256:NOhHxH83qQbsbLddIEVL9+xhyIX9oWHl8USgZEyywJE root@ubuntu (ECDSA)Creating SSH2 ED25519 key; this may take some time ...256 SHA256:wkaWSZ+9GUgGA+iUw6rkcPKgpg4mtEZdHY4feTcHTJg root@ubuntu (ED25519)Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service.Processing triggers for ureadahead (0.100.0-20) ...Processing triggers for systemd (237-3ubuntu10) ...Processing triggers for ufw (0.35-5) ...sysadmin@ubuntu:~$

Page 40: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 50: Download SSH client like putty.exe from http://www.putty.org

Page 41: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 51: Download 64-bits putty.exe file

Page 42: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 52: Click Save

Step 53: Launch putty.exe file by double clicking on it. Type in IP Address and name is as Ubuntu and click on Save and click on Open

Page 43: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 54: When click Open, next you will see this dialogbox, simply click Yes

Page 44: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

Step 55: Type login as: sysadmin and for the password, type sysadmin as well but you will not seeanything being typed and hit Enter key once done.

Congratulation!

You have connected to your Ubuntu Linux system now remotely.

Here you can run any commands.

Show who is logged onsysadmin@ubuntu:~$ whosysadmin :0 2018-06-17 13:32 (:0)sysadmin pts/0 2018-06-17 14:23 (192.168.152.1)

Tell how long the system has been running.sysadmin@ubuntu:~$ uptime 14:27:39 up 55 min, 2 users, load average: 0.01, 0.03, 0.05

Print name of current/working directorysysadmin@ubuntu:~$ pwd/home/sysadmin

Page 45: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

List directory contentssysadmin@ubuntu:~$ lsDesktop Documents Downloads examples.desktop Music Pictures Public Templates Videos

Print effective useridsysadmin@ubuntu:~$ whoamisysadmin

Make directoriessysadmin@ubuntu:~$ mkdir make-a-directory

List directory contentssysadmin@ubuntu:~$ lsDesktop Documents Downloads examples.desktop make-a-directory Music Pictures Public Templates Videos

Change to directorysysadmin@ubuntu:~$ cd make-a-directory/

List directory contentssysadmin@ubuntu:~/make-a-directory$ ls

Change file timestamps if exists and if not, make an empty filesysadmin@ubuntu:~/make-a-directory$ touch make-a-file

List directory contentssysadmin@ubuntu:~/make-a-directory$ lsmake-a-file

Copy files and directoriessysadmin@ubuntu:~/make-a-directory$ cp make-a-file make-a-file-copy

List directory contentssysadmin@ubuntu:~/make-a-directory$ lsmake-a-file make-a-file-copy

Move (rename) filessysadmin@ubuntu:~/make-a-directory$ mv make-a-file make-a-file-move

List directory contentssysadmin@ubuntu:~/make-a-directory$ lsmake-a-file-copy make-a-file-move

Change to directorysysadmin@ubuntu:~/make-a-directory$ cdsysadmin@ubuntu:~$

Page 46: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

List directory contentssysadmin@ubuntu:~$ lsDesktop Downloads make-a-directory Pictures TemplatesDocuments examples.desktop Music Public Videossysadmin@ubuntu:~$

Remove files or directoriessysadmin@ubuntu:~$ rm -rf make-a-directory/

List directory contentssysadmin@ubuntu:~$ lsDesktop Downloads Music Public VideosDocuments examples.desktop Pictures Templatessysadmin@ubuntu:~$

Show commands historysysadmin@ubuntu:~$ history 1 who 2 uptime 3 pwd 4 ls 5 whoami 6 mkdir make-a-directory 7 ls 8 cd make-a-directory/ 9 ls 10 touch make-a-file 11 ls 12 cp make-a-file make-a-file-copy 13 ls 14 mv make-a-file make-a-file-move 15 ls 16 cd 17 ls 18 rm -rf make-a-directory/ 19 ls 17 historysysadmin@ubuntu:~$

Page 47: HOW TO BUILD - storage.googleapis.com€¦ · 10.Run Commands inside Secure Shell Session 11.What’s next? What is Linux? The Linux operating system (OS) powers 98% of the world’s

What’s Next:

Visit http://www.LearnLinux.ca for Linux training courses and details.

If you got any questions, feedback and correction on this document, please do not hesitate to send us a message. We reply promptly!

LearnLinux.ca TeamTXT: 647 571 2299Email: [email protected]

Doc ID: v06182018