Installed virtual box and ubuntu.||System Dual booted with Ubuntu.
Basic Terminologies to start with:
Kernel − The kernel is the heart of the operating system. It interacts with the hardware and most of the tasks like memory management, task scheduling and file management.
Shell − The shell is the utility that processes your requests. When you type in a command at your terminal, the shell interprets the command and calls the program that you want. The shell uses standard syntax for all commands. C Shell, Bourne Shell and Korn Shell are the most famous shells which are available with most of the Unix variants.
Commands and Utilities − There are various commands and utilities which you can make use of in your day to day activities. cp, mv, cat and grep, etc. are few examples of commands and utilities. There are over 250 standard commands plus numerous others provided through 3rd party software. All the commands come along with various options.
Files and Directories − All the data of Unix is organized into files. All files are then organized into directories. These directories are further organized into a tree-like structure called the filesystem.
Basically you can think of directory as a folder in your system.
Basic commands of Linux:-
pwd:-To check the present directory in which you are working
ls:-To list the files and directories stored in the current
Some extensions are:-
ls -l:-To list in the some details of the files in a list format.
ls -a:-To list all the files of a directory including the hidden files.
ls -ld:-To list all the directories within a present directory.
cd:-To change the current directory to another.
Some useful commands of this:-
cd ..:-To move to directory that is one level up of pwd.
cd /:-This command is used to change directory to the root directory, The root directory is the first directory in your filesystem hierarchy.
cd ~:-To move back to the home directory.
cd -:-To visit last directory.
cd dir_1/dir_2/dir_3:-This command is used to move inside a directory from a directory.
touch:-To create blank files.
cat:-To create files with content and to show the content of the file.
It has two situations:-
- No such file pre-exists in the directory:- It will create a file & you can enter the content.
- File pre-exists with the same name in the directory:- It will display the contents of that file.
wc:-To get a count of the total number of lines, words, and characters contained in a file.
2 19 103 filename
This implies that it has 2 lines,19 words,103 characters and name of the file is 'filename'.
cp:-To make a copy of a file.
cp FILENAME COPIED_FILE_NAME
cp filename copyfile:-This will create the file in the same directory named copyfile which is the copy of filename.
cp FILENAME DESTINATION
cp filename /home/Desktop:-This will create a copy of file named filename at the mentioned location i.e Desktop.
mv:-To change the name of a file or a directory.
mv old_file new_file
rm:-To delete an existing file.
mkdir:-To make a directory.
rmdir:-To remove a directory.
Note − To remove a directory, make sure it is empty which means there should not be any file or sub-directory inside this directory.
grep:-To search something(any pattern of characters) in a file.
grep "Helllo" filename
This will search for "Hello" in the file named filename and will display all the lines of that file that contains "Hello" in them.
Thanks for reading.
Will be back soon with some more commands.