KEMBAR78
My First Linux-Ubuntu Notes | PDF | Computer File | Computer Engineering
0% found this document useful (0 votes)
69 views4 pages

My First Linux-Ubuntu Notes

The document provides instructions for installing Ubuntu using different methods like downloading the ISO file, using a virtual machine, or for dual booting. It also includes important steps during installation like creating partitions and swap space. Additionally, it lists many common Linux commands for navigating directories, managing files and processes, and using version control with git.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views4 pages

My First Linux-Ubuntu Notes

The document provides instructions for installing Ubuntu using different methods like downloading the ISO file, using a virtual machine, or for dual booting. It also includes important steps during installation like creating partitions and swap space. Additionally, it lists many common Linux commands for navigating directories, managing files and processes, and using version control with git.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

 Download Linux ISO from website.

(Ubuntu preferably)
 Download VirtualBox or VM Ware and install it.
 Create Virtual Machine and install ubuntu in it.

Steps that are important while Installing Ubuntu:


Go to something else/ more option to manage disk partitions. Create new partition table.
Create swap space for RAM.


 Then create the other disk drives for file storage.
 Continue installation.
For VirtualBox: Install VBox linux additions to increase performance in vbox. Resolution Issue
will get solved.
For Dual boot:
 Burn the ubuntu ISO in a USB drive using Rufus software.
 Turn off fast boot feature of windows.
 Click try ubuntu at first time.
 Click install ubuntu on the desktop.
 Create swap area with double of the RAM you have.
 Create HDD partition for ubuntu in ext4 format.
 Select device for bootloader manager where the windows boot manager is.

For theme download: Match with gtk version.
System Commands:
 Open terminal: Ctrl + Alt + T
 New tab: ctrl + T

CLI Commands:
 Show current directory/ print working directory: pwd
 Clear terminal: clear
 Install: apt-get install
 Change directory: cd
 go to home/ username: cd ~
 current directory: ./
 upward directory: ../
 list contents in the current directory: ls
 list contents in the any directory: ls <dir>
 list contents with details in the current directory: ls -l
 list contents in reverse order in the current directory: ls -r
 list contents based on type in the current directory: ls -p
 list contents based on file size in the current directory: ls -s
 show all options of ls: ls --help
 Administrator permission (super user do) : sudo
 run the previous command with permission: sudo !!
 switch user to root and no more permission needs to be granted: sudo su
 package manager: apt-get
 install from repository: sudo apt-get <prog name>
 search repository for a program: apt-cache policy <prog name>
 install downloaded program: sudo dpkg <file path> <prog name>
 upgrade installed packages from repository: sudo apt-get upgrade
 change ownership of a file: sudo chown <user>:<group> <filename>
 change permissions(read/write): sudo chmod <x1><x2><x3> <filename>
for file:
-> x = 4: read
-> x = 6: read and write
For folder:
-> x = 5: read
-> x = 7: read and write
1st one is for owner, 2nd one is for groups,
3rd one is for public
 delete file: rm <file name>
 make directory(folder): sudo mkdir <dir name>
 change ownership of a folder and all of its files and subfolders:
sudo chown -R <user>:<group> <directory path>
->> ‘-R’ means recursive
 create new files: touch <file1> <file2> <file3>…….as many files you want.
 delete every file with same extension: rm <path>/*.<extension>
 delete every file with same name but various extensions: rm <path>/<name>.*
 delete everything of a folder: rm <path>/*
 delete a folder: rm -rf <folder>
 copy a file: cp <file> <dir. path/`files expected name`>
 move a file: mv <file> <dir. path/`files expected name`>
 rename a file or folder: mv <file or folder> <files or folders new name>
 find: find <dir path> -type f -name “filename”
 find by extension (case sensitive): find <dir path> -type f -name “*.<extension>”
 find by extension (not case sensitive): find <dir path> -type f -iname “*.<extension>”
 find by permission: find <dir path> -type f -perm “0664”
 find by size: find <dir path> -type f -size <requirement>
 find by not an extension (not case sensitive):
find <dir path> -type f -not -iname “*.<extension>”
*Find is normally recursive. To control this,
 find by depth: find <dir path> -maxdepth <number> ……. the rest is same
 search inside file: grep “word to find” <dir path/ file>
 ignore case sensitivity: grep -I “word to find” <dir path/ file>
 show line number: grep -n “word to find” <dir path/ file>
 using grep along with find: <find command> -exec <grep command>
 redirect output of a command: <command> > <file>
 To indicate end of a command: {}
Ex: <find command> -exec <grep command> {} + > <file>
 Show results on terminal and also copy it in file:
<find command> -exec <grep command> {} + > tee <file>
 Show top processes: top
 Show all processes: ps aux
 Show process ids (pid) of a program: pgrep <prog name>
 Kill a process: kill -9 <pid>
 Kill a program: killall <prog name>
 Start a service: sudo systemctl start <service name>
 Stop a service: sudo systemctl stop <service name>
 Run crontab to schedule tasks: crontab -e
 *****
 Install git: sudo apt-get install git git-extras
 Create repo on github and follow the steps shown.
 Add a file or folder to git: git add <file or folder>
 Commit to git: git commit -m“message”
 Add remote repo: git remote add origin <url>
 Show repo status: git status
 Push to online repo: git push

You might also like