Cheat sheet for UNIX – Introduction
UNIX is a group of multi-user and multi-family operating systems that was originally derived from AT&T UNIX. Its research development was initially started at AT&T Bell Laboratory Research Center in the 1970s. It was developed by Dennis Ritchie, Ken Thompson, Brian Kernighan, Joe Ossanna and Douglas McIlroy at Bell Labs. It was initially released in the year 1971. It was licensed under the free and open source and some features under a proprietary license. The default user interfaces are Graphical User Interface (GUI) and Command Line Interface (CLI). It was written completely in Assembly Language and C programming language. It was presented with a Turing Award.
In this Cheat sheet for UNIX article, we will discuss what UNIX is and the different UNIX commands.
Cheat sheet for UNIX Commands and Content:
UNIX commands can often be differentiated or grouped into different categories of powerful commands such as File Commands, Process Management commands, Compression, Network related, File Permissions, Searching and SSH related. Below are the list of Cheat sheet for UNIX commands which perform different kinds of functionalities and operations in UNIX operating system are as follows:
|ls||To list the directory.|
|pwd||To show the current directory.|
|mkdir folder||To create a new directory with the name folder|
|cp f1 f2||To copy file f1 to file f2|
|mv f1 f2||To move file f1 to file f2 if there exists a file named f2|
|rm f1||To delete a file named f1|
|rm –r file||To remove a file forcefully|
|rm –r dir||To delete a directory named dir|
|rm –rf dir||To forcefully remove a directory named dir|
|rm –f f1||To forcefully remove a file named f1|
|touch file||To create or update a file|
|more file||To print the contents of a file as output|
|head file||To print the contents of the first 10 lines of the file as output|
|tail file||To print the contents of the last 10 lines of the file as output|
|ps||To display all the currently active processes in the OS|
|kill pid||To kill the process with the mentioned process id as pid|
|fg||To bring the recently running job to foreground|
|bg||To list all the current background running processes or jobs|
|top||To display all the running processes.|
|ifconfig||To list down all the network related details such as all the assigned IP addresses IPv4 and IPv6, network interfaces etc.,|
|netstat||To list down all the ongoing connections in the local system and the details of ports being listened to and the services those are waiting for requests.|
|nslookup||To query the DNS lookup and find the related details.|
|hostname||To know the details of the hostname and IP address mapped.|
|find||To search the files in the directory specified.|
|grep||To search the selected lines in all the files that match the given pattern.|
|grep <pattern> <files>||To search for the pattern in given lines.|
|grep –rn <pattern> <dir>||To search the pattern recursively for the pattern in a given directory including the line number.|
|grep –r <pattern> <dir>||To search the pattern recursively for the pattern in given directory.|
|command | grep <pattern>||To search for the pattern in the given output of the command.|
|Locate file||To find all the instances of the file using an index-based system of the database that is built of updated command.|
|Find file||To find all the occurrences of a file in the real system file directory.|
Free Tips and Tricks of using Cheat sheet for Unix Commands:-
- The UNIX operating system has a kernel which is the core part of the system that coordinates the entire functionalities to perform different operations.
- It has a Shell which processes the utility requests by interpreting the UNIX commands provided in the terminal by the user.
- The entire data in cheat sheet UNIX is organized in a file system.
- The login command will be used to login to the UNIX system as a valid user before performing any operation whereas logout is the command to log out from the system as a user.
- Shell Scripting is the way of programming that is being carried on cheat sheet UNIX to execute the shell scripts (a series of commands) by the Kernel in UNIX Operating System.
- The file system security in UNIX is based on the access rights of the user such as R, W or X which are called R – Read permission, W – Write Permission, X – Execute Permission.
- There are different commands for access rights of a user in a UNIX system.
Cheat sheet for UNIX commands are as follows:
Cheat sheet for UNIX commands
|chmod||To modify or change the file mode|
|chmod u||To change the file mode to user|
|chmod o||To change the file mode to other|
|chmod r||To change the file mode to read|
|chmod a||To change the file mode to all|
|chmod g||To change the file mode to group|
|chmod x||To change the file mode to execute by accessing the directory|
|chmod w||To change the file mode to write and delete|
|chmod –||To change the file mode to remove the permission|
|chmod +||To change the file mode to add the permission|
- The compression of different files which are large can be carried out by using different files such as gzip, zcat, tar, gunzip etc., to compress and uncompress different tar files, to create archive files in the zip format etc.,
Cheat sheet for UNIX – conclusion
UNIX operating systems are mostly used in most of the server hosting systems to provide highly scalable and highly available systems. The main features and benefits of the UNIX systems are multi-tasking and multi-user capabilities to perform multitasking operations in order to save the time and resources for fulfilling long time taking processing operations. The other main benefit of using cheat sheet UNIX is its security and its speed of operations in the given time which produces effective and efficient results. UNIX has different variants of operating systems such as Linux, BSD etc. to provide different customized functionalities. UNIX has more flexibility and can be installed on different machines and also it is free to use and open source which reduces much overhead maintenance cost and highly beneficial with its operating system design and security and access features.
This has been a guide to Cheat sheet for UNIX here we have discussed the content and command as well as free tips and tricks of cheat sheet for UNIX you may also look at the following article to learn more –
- 4 Effective Shell Script Types For Linux Newbies (Helpful)
- UNIX interview questions
- Cheat sheet SQL (Commands, Free Tips, and Tricks)
- Linux vs Ubuntu
- Top 10 Helpful Linux Apps For System Administrators
All in One Software Development Bundle (600+ Courses, 50+ projects)
4.6 (3,144 ratings)
600+ Online Courses
Python Certification Course
Become a Complete iOS Developer
Programming Languages Courses