background preloader

Excess

Facebook Twitter

25 Linux Shell Scripting interview Questions & Answers. Q:1 What is Shell Script and why it is required ?

25 Linux Shell Scripting interview Questions & Answers

Ans: A Shell Script is a text file that contains one or more commands. As a system administrator we often need to issue number of commands to accomplish the task, we can add these all commands together in a text file (Shell Script) to complete daily routine task. Q:2 What is the default login shell and how to change default login shell for a specific user ? Ans: In Linux like Operating system “/bin/bash” is the default login shell which is assigned while user creation. We can change default shell using the “chsh” command. . # chsh <username> -s <new_default_shell># chsh linuxtechi -s /bin/sh Q:3 What are the different type of variables used in a shell Script ? Unix Quick Guide. What is Unix ?

Unix Quick Guide

The Unix operating system is a set of programs that act as a link between the computer and the user. The computer programs that allocate the system resources and coordinate all the details of the computer's internals is called the operating system or the kernel. Users communicate with the kernel through a program known as the shell. The shell is a command line interpreter; it translates commands entered by the user and converts them into a language that is understood by the kernel.

Unix was originally developed in 1969 by a group of AT&T employees Ken Thompson, Dennis Ritchie, Douglas McIlroy, and Joe Ossanna at Bell Labs.There are various Unix variants available in the market. CHAPTER 4 UNIX COMMANDS. Unix commands have the general format: command [] [] Items in brackets are optional, and words in italics are generic identifiers (i.e. must be replaced by a particular option, e.g.

CHAPTER 4 UNIX COMMANDS

UNIX: Is It For You? Part I: For The User. Copyright 1991 Daniel J.

UNIX: Is It For You? Part I: For The User

Barrett. This article originally appeared in .INFO Magazine, October 1991. This article is freely distributable as long as it is not modified. Commodore has released several Amiga computers that run an industry-standard, multitasking operating system called UNIX. What does UNIX have to offer the average Amiga owner, game player, power user, or programmer? Postprocessing home. The operating system UNIX is very power- and useful with the following items: it runs on nearly all hardware platforms and it's - see LINUX - cheap. it is a multiuser timesharing system; several user can start several job on one machine all at the same time.

postprocessing home

Lots of utilities make it easy to use UNIX.Everything you need to work in a network is integrated. it is very stable. One of UNIX favourites is programm development and that's exactly what we would like to do. UNIX for beginners. 1.

UNIX for beginners

Introduction: What is UNIX ? UNIX is the name of a collection of software known as an operating system (OS) that runs on most computers. The OS software is the means by which the user communicates with the computer's central processing unit (CPU) and memory by means of a keyboard and mouse (for input) and display monitor (for output), in order to perform computations. The OS software is also responsible for communications between the CPU/memory and the computer's other peripherals such as disks, tapes, printers, dials, networks, etc., allowing these to be shared with other users (multi-user system), and/or with other jobs that a single user is running simultaneously (multi-tasking system).

The OS ensures that no two users or jobs can access the same device (CPU, memory, peripherals) at the same time; one is allowed to proceed while the other is forced to wait until the device is no longer busy. The Linux Cookbook: Tips and Techniques for Everyday Use - Files and Directories. 2.1 Using Linux in command line. 2.1.1 Files and directories in Linux The file systems in Linux machines are based on hierarchical directory tree.

2.1 Using Linux in command line

There is one root directory in to which you can refer with slash sign (/). All the files and directories locate in the subdirectories of this directory so that each file has a unique combination of name and directory path. Also the commands that user gives are executed in a directory in which user currently is called current working directory. Normally you do not need to know the explicit directory paths when you work in the CSC environment. Basic Linux Commands. Basic Linux Commands The linux operating system used for the PARTICLE DAQ system can be used either in a terminal mode where you type commands or in a Windows Explorer style graphical user interface (GUI).

Basic Linux Commands

The Explorer-like GUI can be used for file manipulation functions (e.g., copying a file to a floppy) or deleting or moving files on the disk. It cannot be used to run the PARTICLE DAQ itself. To begin using the Explorer-like GUI, double click on the icons on the Desktop. For the most part, Explorer mode will be familiar from Windows or MAC OS, so with a few exceptions, this information will not focus on this. To begin working in the terminal mode, you will need to open a terminal.

Man This command brings up the online Unix. LINUX optional lab. Objectives In this lab, you will learn how to use UNIX commands to navigate through the file system of a remote Unix computer and create files there.

LINUX optional lab

Remote login to dante Use UNIX commands to navigate directories and move files Create and edit files with the pico editor You will be using the web to publish parts of your completed assignments (homeworks, labs, and projects) throughout the quarter. Therefore, you must know how to upload files to your web directory on dante. UNIX Tutorial One. 1.1 Listing files and directories ls (list) When you first login, your current working directory is your home directory.

UNIX Tutorial One

Your home directory has the same name as your user-name, for example, ee91ab, and it is where your personal files and subdirectories are saved. To find out what is in your home directory, type % ls The ls command ( lowercase L and lowercase S ) lists the contents of your current working directory. There may be no files visible in your home directory, in which case, the UNIX prompt will be returned.

A guide to files and folders on Linux « Blog « Peter Upfold. Find this tutorial useful? In my second tutorial about Linux, I’m going to look at files and folders and how they work on Linux – because it’s very different compared to the Windows way of C:, D:, and E: etc. Basically, in Linux (and other Unix-based systems, but I’ll keep it simple for now), there aren’t different drives. In Linux, everything you can access stems from the top folder in the stack. Introduction to UNIX and Linux: Lecture 2.

Pwd (print [current] working directory) pwd displays the full absolute path to the your current location in the filesystem. So $ pwd /usr/bin implies that /usr/bin is the current working directory. Characters to Avoid in Directories and Filenames. Your web files will be viewed by numerous users who use a wide variety of operating systems (Mac, PC, and Linux for instance) and devices (desktops, tablets, and smartphones are some examples). Therefore, it is essential to play it safe and avoid common illegal directory and filename characters. Naming conventions are important in web folders as well as for downloadable files such as PDFS, Word documents, and Excel spreadsheets.

Do not use any of these common illegal characters/symbols: Also, keep these rules in mind. Don’t start or end your filename with a space, period, hyphen, or underline.Keep your filenames to a reasonable length and be sure they are under 31 characters.Most operating systems are case sensitive; always use lowercase.Avoid using spaces and underscores; use a hyphen instead. Bad filenames: F&A Costs.htmlmy PDF file#name.pdf Web Browsers see: Good filenames: index.htmlmy-pdf-file-name.pdf.

Special Characters. Comments may also occur following the end of a command. Comments may also follow whitespace at the beginning of a line. Certain pattern matching operations also use the #. Command separator [semicolon]. Permits putting two or more commands on the same line. Note that the ";" sometimes needs to be escaped. Terminator in a case option [double semicolon]. Unix Directory Management. The Unix Shell: Navigating Files and Directories. Overview Teaching: 15 min Exercises: 0 min Questions How can I move around on my computer?

How to Use Linux Commands in Windows with Cygwin. Windows command-line tools have advanced a lot with PowerShell, but Linux has had a much more usable terminal for many years. Here’s how you can get the best of both worlds with Cygwin, a ‘nix-style terminal for Windows PCs. In today’s lesson, we’ll explain how to get Cygwin running, but stay tuned for future articles where we’ll explain how to use it for all sorts of different things. Install Cygwin Cygwin comes with a normal setup.exe to install in Windows, but there are a couple steps you will need to pay attention to, so we will walk you through the installation.