---
title: "Linux Basics - 1"
author: "willpower"
date: "2007-03-06T14:25:11Z"
tags: []
slug: "linux-basics-1"
draft: false
lastmod: "2007-03-06T14:25:11Z"
id: 57743
url: "https://willpower.iteye.com/blog/57743"
---

1&gt; linux file types:  
ordinary, directory, block(harddisk...device), character(crt,...)

2&gt; file name:  
256 characters

3&gt; directories:  
/bin Contains the Linux system commands and programs (also called binaries). Pronounced "slash bin."

/dev Contains special device files that correspond to hardware components. Pronounced "slash dev."

/etc Contains configuration files for Linux and other installed software. Pronounced "slash et-see."

/home Contains the home directories (personal storage) for each user on the system. Pronounced "slash home."

/sbin Contains more Linux binaries (special utilities not for general users). Pronounced "slash ess-bin."

/root The home directory for the root user; not to be confused with /. Some Linux systems use /home/root instead of /root. Pronounced "slash root."

/usr  Contains system programs and other files for general users such as games, online help, and documentation. By convention, a user should not put personal files in this directory. Pronounced "slash user."

4&gt; cd, ls -l, cat, more, cp, mv, touch, echo &gt;..., cat &gt; fox.file ^D, mkdir, rm, rmdir, wildcard(\*),

5&gt; change permissions:

The general form of the **chmod** command is

**chmod &lt;permission flags&gt; &lt;file or directory name(s)&gt;**

**To tell chmod the new permissions for a file, you can use any combination of these permission flag characters:**

**WHO IT APPLIES TO ACCESS CHANGE ACCESS TYPE (pick one or more) (pick one) (pick one or more) u For the owner + Grant access r For read access g For the group - Deny access w For write access o For all others x For execute access**

**Here are some examples:**

**chmod o-r pig\_info Remove read access from all others.**

**chmod g+rw pig\_info Grant read and write access to group.**

**chmod ugo+x zippity Grant execute access to everybody.**

**6&gt; Transfer ownership:**

***Transferring Ownership of a File Using Chown***

**If you are logged in as root, you can transfer ownership of a file or directory (if you move it into another user's directory) using the chown command.**

**To tell chown what to do, just give it the new owner and the file name, like this:**

**chown sigmund zippity**