0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Linux Command Historyまとめ

Last updated at Posted at 2024-04-21

コマンドを覚えたいので一度でも使ったコマンドはできるだけ以下に追加して覚えるようにします。

- neofetch # Display system information in a visually appealing way. Various flags like --ascii_distro show ASCII art of a specific Linux distribution.

- sudo getenforce, sudo sestatus # Commands related to SELinux, displaying current mode and status respectively.

- apt list --installed | grep <package> # List installed packages and filter results for specific ones, useful for checking if a specific package is installed.
- sudo aa-status # Check the status of AppArmor, a Linux kernel security module.
- sudo systemctl status <service> # Check the status of a system service, e.g., `sudo systemctl status apparmor.service`.
- sudo cat /sys/kernel/security/apparmor/profiles # Display AppArmor loaded profiles.
- sudo ls /etc/apparmor.d/ # List AppArmor profiles stored in its configuration directory.
- sudo aa-disable <profile>, sudo aa-enforce <profile> # Disable or enforce AppArmor profiles, respectively.

- sudo ufw status # Check the status of the Uncomplicated Firewall (UFW).
- sudo iptables -L # List all current iptable rules.
- ufw default deny # Set the default policy of the firewall to deny.
- sudo ufw allow/deny <port> # Allow or deny traffic on specific ports.

- ip addr show # Display all IP addresses associated with all network interfaces.
- ping -c <count> <destination> # Send a specified number of ping requests to a destination to test connectivity.
- systemctl status NetworkManager # Check the status of the NetworkManager service.
- nmcli, nmtui # Command-line and text user interface tools for network configuration.

- man <command> # Display the manual pages of a command, e.g., `man ls`.
- apropos <keyword> # Search the manual page names and descriptions for instances of a keyword.
- find <directory> -name <pattern> # Search for files matching a name pattern within a directory tree.
- cat /etc/passwd | grep <username> # Display the entry from the passwd file for a specific user.
- shopt -s/-u globstar # Enable or disable the globstar shell option for matching files and directories recursively using **.
- sudo find / -name <name> -type d/f # Find directories or files across the entire filesystem with a specific name.
- zcat <file.gz> | nroff -man # Display the manual page from a gzipped file.

追加準備

- cat /etc/os-release
- uname -a
- hostnamectl
- lsb_release -a
- sar 1 5
- sar -b 1 5
- sar -r 1 5
- taskset -c 0 ./program.py &
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?