forked from Suryansh1720001/Developer-Cheatsheet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d615204
Showing
2 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Linux | ||
Unix is now one of the most commonly used Operating systems used for various purposes such as Personal use, Servers, Smartphones, and many more. It was developed in the 1970’s at AT& T Labs by two famous personalities Dennis M. Ritchie and Ken Thompson. | ||
|
||
## Architecture of Linux | ||
- Kernel | ||
- System Library | ||
- Shell | ||
- Hardware Layer | ||
- System Utility | ||
|
||
## Files | ||
```sh | ||
ls # list all files | ||
ls -al # lists hidden files | ||
cd <path> # change directory to path | ||
cd # change to home | ||
pwd # shows current directory | ||
mkdir <dirName> # create a new directory with given name | ||
cat <fileName> # displays the file content | ||
cat > <fileName> # creates a new file | ||
rm <fileName> # removes file with given name | ||
du -sh * # list directories with their total sizes | ||
df -h # to see free disk space | ||
|
||
``` | ||
|
||
## Files Permission | ||
```sh | ||
ls -l # to show file type and access permission | ||
r # read permission (4) | ||
w # write permission (2) | ||
x # execute permission (1) | ||
chown <user> # for changing the ownership of a file/directory | ||
chown <user>: <group> <fileName> # change the user as well as group for a file or directory | ||
chmod <mode> <filename> # change the permissions of a file/directory | ||
|
||
``` | ||
|
||
## To change directory permissions in Linux, use the following: | ||
```sh | ||
chmod +rwx #filename to add permissions. | ||
chmod -rwx #directoryname to remove permissions. | ||
chmod +x #filename to allow executable permissions. | ||
chmod -wx #filename to take out write and executable permissions. | ||
``` | ||
## tar/zip | ||
- Use the tar command to compress and expand files from the command line. The syntax is shown below: | ||
|
||
### Syntax | ||
- tar [options] [archive-file] [file or directory to be archived] | ||
|
||
```sh | ||
tar -zcvf foo.txt.tar.gz foo.txt # Create a zipped archive-file | ||
tar -tvf foo.txt.tar.gz # List archive files | ||
tar -xvf foo.txt.tar.gz # Extracting archive-file | ||
|
||
Options: | ||
-c # Creates Archive | ||
-x # Extract the archive | ||
-f # creates archive with given filename | ||
-t # displays or lists files in archived file | ||
-u # archives and adds to an existing archive file | ||
-v # Displays Verbose Information | ||
-A # Concatenates the archive files | ||
-z # zip, tells tar command that creates tar file using gzip | ||
-j # filter archive tar file using tbzip | ||
-W # Verify a archive file | ||
-r # update or add file or directory in already existed .tar file | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# UBUNTU-22.04 | ||
|
||
Ubuntu is a free and open-source Linux distribution based on Debian. In this section, we will explore new features of Ubuntu 22.04. | ||
Ubuntu is one of the most popular Linux distributions. The reason being it’s main goal is to be the most user-friendly non-geek Linux operating system out there. | ||
- Every software either application or any operating system have its shortcomings but those softwares become best whose features outweighs their shortcomings and same is the case with the all-new Ubuntu 22.04. | ||
|
||
### Ubuntu 22.04 Download | ||
You can download the iso file of latest version of ubuntu from here - https://ubuntu.com/#download | ||
|
||
### Requirements, Conventions or Software Version Used | ||
|
||
| Category | Requirements, Conventions or Software Version Used | | ||
| ------------- | ------------- | | ||
| System | 64-bit PC (AMD64), see Ubuntu 22.04 system requirements | | ||
| Software | N/A | | ||
| Other | Privileged access to your Linux system as root or via the sudo command | | ||
| Conventions | # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command | ||
| | $ – requires given linux commands to be executed as a regular non-privileged user | | ||
|
||
### File System Navigation | ||
|
||
| Command | Description | | ||
| ------------- | ------------- | | ||
| ls| List all the files in a directory | | ||
| ls -l | List all files and their details (owner, mtime, size, etc) | | ||
| ls -a | List all the files in a directory (including hidden files) | ||
| pwd | Show the present working directory | | ||
| cd | Change directory to some other location | | ||
| file | View the type of any file | | ||
|
||
|
||
|
||
### View, Create, Edit, and Delete Files and Directories | ||
| Command | Description | | ||
| ------------- | ------------- | | ||
| mkdir| Create a new directory | | ||
|touch| Create a new, empty file, or update the modified time of an existing one | | ||
|cat > file | Create a new file with the text you type after | | ||
|cat file| View the contents of a file | | ||
|grep| View the contents of a file that match a pattern | | ||
|nano file| Open a file (or create new one) in nano text editor | | ||
|vim file| Open a file (or create new one) in vim text editor | | ||
|rm or rmdir| Remove a file or empty directory | | ||
|rm -r| Remove a directory that isn’t empty | | ||
|mv |Move or rename a file or directory | | ||
|cp |Copy a file or directory | | ||
|rsync| Synchronize the changes of one directory to another | | ||
|
||
|
||
### Community Support in ubuntu-22.04 | ||
|
||
* https://ubuntu.com/support/community-support | ||
* https://askubuntu.com/ |