Starting with Ubuntu

Hardware is nothing but finely designed machinery. A machine is ultimately a machine only, which is always made to work. It is the kernel on an operating system that makes the hardware alive. There is a hugely popular operating system Linux which is mostly used in most sincere applications. 




Linux is an open source operating system (i.e., its code is also available) created by a Finnish student Linus Torvalds. Linux is available in multiple distributions such as Ubuntu, Red Hat, Linux Mint, Fedora, Debian, CentOS and many more. In this session, you shall learn to work with Ubuntu distribution of Linux.

It's derived from Debian and composed mostly of free and open-source software. Ubuntu is officially released in multiple editions: Desktop, Server, and Core for Internet of things devices and robots. The operating system is developed by the British company Canonical and a community of other developers, under a meritocratic governance model.


Starting Ubuntu

When you boot your computer/laptop with Ubuntu, you are first taken to login screen, where you need to log in.

  1. On this log in screen, select the user you want to login as, enter the password and press Enter. Select user name and enter password to log in
  2. In a few seconds the user's desktop will appear.

User Interface
  1. The Favorites panel on the left side of the screen contains shortcuts to frequently used applications.
  2. From the top right of the dark grey bar at the top you can reach Network settings, System language. Audio volume, System date and time and Power menu.
  3. From the Power menu you can switch to a different user, logout, power off the system or access system settings.
  4.  To open System Settings menu, click on Power menu first and then click at System Setting. In the 'System Setting' menu you can set several different parameters for the system.

Launch an application
  1. Launch the applications listed in the Favorites panel simply by clicking on them.
  2. If the application you want to launch is not in the Favorites panel, use the Ubuntu Launcher. Click on the Ubuntu Launcher iconic the top left corner of the screen.
  3. Write down the name of the application. A list of applications matching the name you are searching will show up, for and press Enter or click on the icon of the application.

Browse files and Surf Web
  1. To browse files on your computer, click on Home folder in the favorites panel.
  2. To surf web or launch your web browser, click at the Firefox icon in the Favorites panel 

Launch the Terminal Emulator

A terminal emulator is a program that allows the use of the terminal in a graphical environment. Through a terminal window, you can use Linux commands. 
To launch the terminal emulator in Ubuntu:
  • Click on the Ubuntu Launcher icon in the top left corner of the screen, and type gnome-terminal in the search box.
  • It will show the Terminal emulator's icon, click on it to launch the terminal window.
  • Terminal emulator will open and will be ready for your commands.
  • To exit from terminal, you can press Ctrl+d key combination.

Linux Directory Structure

The Linux directory structure follows a hierarchical model that starts with the root directory, represented by ( / ), which serves as the base of the entire system. Here’s a brief overview of the major directories:
  1. / (Root): The root of the filesystem. All other directories are contained within it. Only the root user has write permissions in this directory.
  2. /bin: Contains essential binary executables for basic system commands that are available to all users, such as ls, cp, mv, and cat.
  3. /boot: Holds all the necessary files for booting the system, including the Linux kernel (vmlinuz), bootloader configuration files, and initial RAM disk image (initrd).
  4. /dev: Stands for device files. It contains special files that represent hardware devices such as disks, printers, and other peripherals (e.g., /dev/sda for the first hard drive).
  5. /etc: Contains system-wide configuration files and shell scripts used to boot and configure the system. Examples include network configuration files, user login information, and system settings.
  6. /home: Holds the personal directories of users. Each user has a subdirectory under /home (e.g., /home/username), where their personal files and settings are stored.
  7. /lib: Contains essential shared libraries and kernel modules. These libraries support the binaries in /bin and /sbin.
  8. /media: Used for mounting external removable media like USB drives, CDs, or DVDs.
  9. /mnt: A generic mount point where temporary filesystems can be mounted.
  10. /opt: Optional software packages that are not part of the default installation. This is often where third-party software is installed.
  11. /proc: A virtual filesystem providing information about running processes and the kernel. This directory does not contain real files but runtime system information.
  12. /root: The home directory for the root (administrative) user.
  13. /run: Contains information about the running system, such as system-wide process IDs (PIDs), and other system runtime data.
  14. /sbin: System binaries, including crucial system administration commands, typically accessible only to the root user (e.g., fdisk, ifconfig).
  15. /srv: Contains data for services provided by the system, such as web servers or FTP servers.
  16. /tmp: Used for temporary files created by programs. Files stored here are usually deleted upon reboot.
  17. /usr: Contains user-related programs and data, including user binaries (/usr/bin), libraries (/usr/lib), and source code (/usr/src).
  18. /var: Contains variable data files, such as logs, mail, databases, and print queues that change frequently.

Some Essential Linux Commands

1. ls command
The ls command lists the content of a folder, including files and directories. 
If you omit the path, the ls command will check the content of your current directory. To list items inside subfolders, add the -R option. Meanwhile, use -a to show hidden content.
syntax:
ls [options] [directory_or_path]

2. pwd command
To check the full path of your current working directory, use the pwd command. Its 
The pwd command has only two options. The -L option prints environment variable content, like shortcuts, instead of the actual path of your current location. Meanwhile, -P outputs the exact location.
syntax:
pwd [options]

3. cd command
Use cd to navigate between directories in your Linux VPS. It doesn’t have any option. 
Depending on your location, you might only need to specify the parent directory.
syntax :
cd [path_or_directory]

4. mkdir command
The mkdir command lets you create one or multiple directories.
To create a folder in another location, specify the full path. Otherwise, this command will make the new item in your current working directory.
syntax :
mkdir [options] directory_name1 directory_name2

5. rmdir command
Run rmdir to delete empty directories in your Linux system.
The rmdir command won’t work if the directory contains subfolders. To force the deletion, add the –p option. Note that you must own the item you want to remove or use sudo instead.
syntax : 
rmdir [options] directory_name

6. rm command
The rm command deletes files from a directory. You must have the write permission for the folder or use sudo.
You can add the -r option to remove a folder and its contents, including subdirectories. Use the -i flag to display a confirmation message before the removal or -f to deactivate it completely. Avoid using -r and -f unless necessary. Instead, add -i option to prevent accidental deletion.
 syntax:
rm [options] file1 file2

7. cp command
Use the cp command to copy files from your current directory to another folder. 
You can also use cp to duplicate the content of one file to another using this syntax.
syntax :
cp file1 file2 [target_path]

8. mv command
The main usage of the mv command is to move a file or folder to another location.
syntax:
mv file_or_directory [target_directory]

9. touch command
Run the touch command to create a new empty file in a specific directory.If you omit the path, the touch command will create a new file in your current working directory.
syntax :
touch [options] [path_and_file_name]

10. file command
The file command checks a file type, such as TXT, PDF, or other. If you use this command on a symbolic link, it will output the actual file connected to the shortcut. You can add the -k option to print more detailed information about the item.
syntax:
file [file_name]

Comments

Popular posts from this blog

Preprocessor Directives in C

Function Generator

The World Of Linux