All Go Rust Python PHP JavaScript
Chrome Dev Summit to secure your spot in workshops, office hours and learning lounges!

How to Get the System Hostname in Python

In Python, there are 3 ways to get the system hostname. Using gethostname Method The socket.gethostname() method returns a string containing the hostname of the machine where the Python interpreter is currently executing. For example, #!/usr/bin...
Tomoki

How to Generate a UUID in Go

In Golang, there are 4 ways to generate a uuid. Using uuid Package install Use the following command to download the repository to the local file system. install go mod tidy go get github.com/google/uuid go install github.com...
Sambhav Khandelwal

How To Install Go in Linux

In Golang, there are 2 ways to install Go in Linux.Download Packages Download packages for Windows 64-bit, macOS, Linux, and more. Go install Linux Remove any previous Go installation by deleting the /usr/local/go folder (if it exists), then extr...
Unused

How To Install Rust in Linux

In Rust, there are two ways to install rust in Linux.Running the following in your terminal If you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen i...
pooriabt

Hello World in Python

Hello, World! is the first basic program in any programming language.Python Version Print the Python version number and exit. Example output could be: Python version python -V python --version Python 3.9.1 Running Files with Command Lines You c...
ada

How to use the telnet command in Linux

user interface to the TELNET protocol. Telnet is an application protocol used on the Internet or local area network to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. User data is interspe...

How to use the mkdir command in Linux

Create the DIRECTORY(ies), if they do not already exist. mkdir command in Linux allows the user to create directories (also referred to as folders in some operating systems ). This command can create multiple directories at once as well as set the p...

How to use the history command in Linux

history command is used to view the previously executed command. The history command works with the command history list. When the command is issued with no options, it prints the history list. The History library provides a history expansion featur...

How to use the kill command in Linux

terminate a process. kill is a command that is used in several popular operating systems to send signals to running processes. The command kill sends the specified signal to the specified process or process group. If no signal is specified, the TE...

How to use the head command in Linux

Print the first 10 lines of each FILE to standard output. head is a program on Unix and Unix-like operating systems used to display the beginning of a text file or piped data. By default, head will print the first 10 lines of its input to the stand...

How to use the gzip command in Linux

Compress or uncompress FILEs. Gzip reduces the size of the named files using Lempel-Ziv coding (LZ77). Whenever possible, each file is replaced by one with the extension .gz, while keeping the same ownership modes, access and modi‐ficati...

How to use the grep command in Linux

Search for PATTERN in each FILE or standard input. grep is a command-line utility for searching plain-text data sets for lines that match a regular expression. Its name comes from the ed command g/re/p (globally search for a regular expression and p...

How to use the free command in Linux

Display amount of free and used memory in the system. free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo....

How to use the find command in Linux

search for files and directories based on their permissions, type, date, ownership, size, and more. find is a command-line utility that locates files based on some user-specified criteria and either prints the pathname of each matched object or, if ...

How to use the diff command in Linux

Compare FILES line by line. You can use the diff command to show differences between two files, or each corresponding file in two directories. diff outputs differences between files line by line in any of several formats, selectable by command line o...