c# – Introduction

C# is a powerfull object oriented program language. It is heavily engineered programming language.

In this tutorials you are going to learn all kinds of things.

In our tutorials we will show you a lot of things that won’t make a lot of things until much later. That’s why we will show you a lot of things without explaining them in detail. But will cover them in more detail in later units. When this happens we will explain

Because c# is syntax, we will show you a lot of things but explain them later.

C# is a really powerful programming language. It is basically

C# is a syntax heavy language, that means that even writing a basic program involves typing out a lot of code that on first impressions look superfluous. However everything is important


Linux – cat and nano

 

Commands:

cat

nano         # This is a text editor. no need to learn this. vim is much better.

Config files:

n/a

Notes:

Here are some example using cat (as a text file creator rather than a file content’s outputter):

example 1:

$ cat <<EOF =>testfile     # This lets you start writing stuff, until you type EOF, after that your content gets stored in testfile.

=> this is a testfile

=> another line

=> EOF

example 2:

$ cat <<EOF                    # Here the output is printed directly pack to the command line.

=> this is a testline

=> another line

=> yet another line

=> EOF

this is a testline

another line

yet another line

Related Services:

Inserttexthere

 

Must survive reboot:

n/a

Software to install:

n/a

GUI tool:

n/a

Book ref:

n/a

Study guide ref:

n/a


Linux – Help at the Command Line

Commands:

man {command}

info {command}

pinfo {command}               # displays man pages in a slight differently user friendly format.

man -k {search term}       # Searches all the search terms for the search-term, and lists all the man pages where there is a match.

apropros {search term} # same as the “man -k {search term}”

type {command}             # tells you if command is builtin or not, if not then shows the path.

which {command}               # shows command’s file location (even for builtin ones).

whatis {command}             # one line description of a command.

{command} –help           # quick tips on how to use a


RHCSA – The Bash Terminal

In Linux, nearly all day to day tasks are performed inside a command line terminal, aka the bash terminal.

There’s a few ways to access it depending on various circumstance.

First of it depends on whether you are sitting in front of your Linux machine or you want to access it remotely (e.g. this is likely if your machine is locked away in data centre, or server room).

Directly Accessing your Bash terminal

If you are sitting in front of your machine, then to access the terminal will depend on whether your machine has a graphical User Interface installed. If so then you can access the bash terminal by

If your machine has the graphical UI, then you can access your bash terminal by either:

right click anywhere on the desktop															

Linux – Accessing the linux terminal

The way you access the   linux command line terminal, depends on the scenario:

Scenario 1 – Access your Linux desktop machine’s terminal

Using the gnome ui, interface, simply go to:

Useful Tip: you can create a desktop shortcut to save time.

Scenario 2 – Access a remote linux server’s   terminal from a windows desktop machine.

In most corporate workplaces, linux servers are locked away in server rooms. In these cases, you can access the server’s terminal remotely by using a software called putty. Putty creates a connection to the linux server and opens up a virtual terminal. After that you can use this terminal just as if you were access the linux server directly.

Useful Tip: In a corporate workplace, you may need to remotely connect to several remote linux machines. Then you might


Give a user more priveleges using sudo

## Setting up and assign sudo priveleges

The Sudo utility lets you give a users custom privileges so that they can run commands that they are not normally allowed to run.

For example, only the root user can run the “Shutdown” command. But if you want give another user permission to run this command, then you can do this using sudo.

To configure privileges, all you have to do is edit the sudo’s config file (which is called sudoers):

/etc/sudoers

## Use visudo instead of vim.
Be careful that you don’t make any errors when editing the sudeors file. Thats becuase any errors can stop your machine from booting up. One way to avoid making errors is to use visudo to edit the sudoers file. visudo is a specialized version of vim that has been


Linux – Temporarily switch to another Linux user (using su)

## How to switch users or temporarily become root

## Commands covered in this article
id            # Displays the username of the currently logged in user. It also displays what groups the user belongs to.
su        # Lets you (s)witch to another (u)ser while logged in as someone else.
sudo      # xxxxxxxxxxxxxxxxx

## Become the root user using “su”
In linux it is always recommended that you avoid logging in as the root user directly. That’s because it can cause security issues and increases the chances of damaging something. In fact, Centos will display a warning message when you attempt a direct root login.

So the best practice is that you always login as a normal user.


Linux – Introducing “VIM”, a powerful text editor

## Howto: open and edit files in Linux

In Centos, you can view files either from the command line, or using a gui text editor called emacs.

But in this article, we will focus on doing this from the command line.

## View files

In linux there are several commands to view a file. Here are a few of them:

cat {filename}            # Displays the file’s content.
less {filename}            # Displays the file’s content. this command also has few other options, such as you can also scroll up/down using the arrow keys.
head {filename}            # Displays the first few lines of a file.
tail {filename}            # Displays


Linux – Compress a whole folder in Linux (using tar)

What is tar

You may have come across the gzip and bzip2 commands which are used for compressing individual files. But if you want to compress a whole directory, then the command you need to use is tar. The tar command requires you to declare a number of options for it work, so the best way to understand how tar works is to see it in action:

Creating a tar file.

The tar command has several different modes, and to generate a tar file, you need to enable the “create” mode. Here’s how you compress a whole directory.

tar -cf {tar-filename} /path/to/dir

For the above, you can read the options “-cf” as: (c)reate a tar (f)ile with the name {tar-filename}, using the content from /path/to/dir.

If you want to do the above, but also see the


Linux – Compressing files in Linux

## File compression.

## Commands covered in this article
gzip      # A file compression utility
bzip2      # A file compression utility
tar            # A tool that can <l=>archive a whole directory<l=> and convert it into a single file.
star #.secure tar. (not as important but worth learning.)

## gzip and bzip
Linux comes pre-installed with a number of file compression utilities. However the 2 most commonly used compression utilities are gzip and bzip2. Both of these tools work pretty much the same way. The only difference is that gzip is slighter better at compressing (resulting in an even smaller file when compared to bzip2) whereas bzip2 is slightly faster at compressing.

<insert code=>

So your choice of whether to use