Common Questions of Linux Beginner
I havent started using Linux
Which Linux distribution should I try as beginner?
A: Ubuntu 16.04 / 18.04 / 20.04
Ubuntu is a free and open-source Linux distribution based on Debian. Ubuntu is officially released in three editions :Desktop, Server, and Core. All the editions can run on the computer alone, or in a virtual machine. Ubuntu is a popular operating system for cloud computing, with support for OpenStack.
How can I install Ubuntu?
A: Check my another blogpost on How to Setup Ubuntu
I have started using Linux!
How do I use the command window?
How to…
Looking around directories?
Looking for things?
A: Check my another blogpost on Linux Command Line
Ctrl + Alt + T
= Open terminal
Ctrl + C
= Kill Current Program
Crtl + Shift + C
= Copy in terminal
Crtl + Shift + V
= Paste in terminal
Tab
= Auto-complete in terminal
Note when you press enter, as well as being executed, your text is saved in a command history. Use arrow keys to browse this history to avoid retyping commands.
How do I Copy and Paste in a command window?
A: Check my another blogpost on Linux Command Line
Crtl + Shift + C
= Copy in terminal
Crtl + Shift + V
= Paste in terminal
How can I have multiple command window in the screen?
How to display more than 1 terminal simultaneously
I have started installing things in Linux!
What is apt-get
command?
A: apt-get
is a tool which helps in handling packages in Linux.
To Synchronize the Package index files from their source:
We usally do this before apt-get install
.
1 | apt-get update |
Installation of Package:
1 | apt-get install [pkg] |
What is wget
command?
A: wget
command is a command line utility for downloading files from the Internet. It supports downloading multiple files, downloading in the background, resuming downloads, limiting the bandwidth used for downloads and viewing headers.
1 | wget [options] [url] |
What is the difference between .tar and .deb?
A: Tar balls are usually source code that you have to compile. Debs are pre-compiled programs, already built and configured for Ubuntu/Debian.
Strongly suggest using debs when available, as they are easier, and they integrate with the package manager, so you can easily uninstall them.
For Tar files, you can extract with command line:
extract the file to the current directory.
1 | tar -xvf yourfile.tar |
or extract to another directory.
1 | tar -C /myfolder -xvf yourfile.tar |
What is source
command?
A: source
is a shell bulit-in command which used to read and execute the content of a file.
1 | source file.txt |
How do I edit a txt file?
A: Use gedit or vim.
1 | gedit file.txt |
How do I change a file into executable?
A: Use chmod -x
.
1 | chmod -x [file] |
What is ~/.bashrc file?
A: bashrc file is a script file that’s executed when a user logs in. The file itself contains a series of configurations for the terminal session.
I forgot my account password! What can I do?
A: Easily Reset Forgotten in Password Ubuntu Linux [With Video]
Recovery
Recovery mode
In case we edited some file and messed up and cant boot into ubuntu,
go to recovery mode.
- Start up Ubuntu in recovery mode.
- Choose "Drop To Root Shell Prompt’
- By default, this will allow you to access the file system in read-only mode.
- Switch to read/write mode by executing.
1 | mount -o remount,rw / |
Then we can edit files in terminal.
After finished editing, Simply type reboot, and hit Enter to reboot ubuntu.
Another way
If it is black screen but it is not freezed, we can press alt
+ f2
to go into terminal.
First we need to login with username and password.
Then you can mess with the terminal and fix problems.