diff --git a/linux.sh b/linux.sh new file mode 100644 index 0000000..271a0bc --- /dev/null +++ b/linux.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# 1. Connect to the server +ssh user@192.168.1.10 + +# 2. Navigate to /var/log +cd /var/log + +# 3. List files and directories and save to log_list.txt +ls > ~/log_list.txt +# or with details +ls -la > ~/log_list.txt + +# 4. Create a new user named testuser without a home directory +sudo useradd -M testuser + +# 5. Create a directory named testdir in your home directory +cd ~ +mkdir testdir + +# 6. Change permissions of testdir +chmod 700 testdir + +# 7. Display the current network configuration +ifconfig +# or +ip addr + +# 8. Update the package list and install curl for debian and ubuntu and other debian based distro +sudo apt update +sudo apt install -y curl \ No newline at end of file